|
|
@ -68,7 +68,7 @@ def execute(program): |
|
|
|
elif ctx[0] == _ident("miracle"): |
|
|
|
elif ctx[0] == _ident("miracle"): |
|
|
|
return _box(getattr(eval(_destr(subs[1])), _destr(subs[2]))(*[(i if type(i) == type([]) else i[1]) for i in _fixarr(subs[3])])) |
|
|
|
return _box(getattr(eval(_destr(subs[1])), _destr(subs[2]))(*[(i if type(i) == type([]) else i[1]) for i in _fixarr(subs[3])])) |
|
|
|
elif ctx[0] == _ident("r"): |
|
|
|
elif ctx[0] == _ident("r"): |
|
|
|
return open(_destr(subs[1]), "r").read(_destr(subs[2])) |
|
|
|
return open(_destr(subs[1]), "r").read(int(_destr(subs[2]))) |
|
|
|
elif ctx[0] == _ident("w"): |
|
|
|
elif ctx[0] == _ident("w"): |
|
|
|
return open(_destr(subs[1]), "w").write(_destr(subs[2])) |
|
|
|
return open(_destr(subs[1]), "w").write(_destr(subs[2])) |
|
|
|
elif ctx[0] == _ident("def"): |
|
|
|
elif ctx[0] == _ident("def"): |
|
|
|