Aggiornata libreria js2py

This commit is contained in:
marco
2022-12-04 14:33:39 +01:00
parent d7ab122d31
commit e91e29b95d
27 changed files with 681 additions and 161 deletions
+6 -5
View File
@@ -45,6 +45,7 @@ TODO
"""
from __future__ import print_function
from utils import *
@@ -64,7 +65,7 @@ OP_METHODS = {
def dbg(source):
try:
with open('C:\Users\Piotrek\Desktop\dbg.py', 'w') as f:
with open(r'C:\Users\Piotrek\Desktop\dbg.py', 'w') as f:
f.write(source)
except:
pass
@@ -77,13 +78,13 @@ def indent(lines, ind=4):
def inject_before_lval(source, lval, code):
if source.count(lval) > 1:
dbg(source)
print
print lval
print()
print(lval)
raise RuntimeError('To many lvals (%s)' % lval)
elif not source.count(lval):
dbg(source)
print
print lval
print()
print(lval)
assert lval not in source
raise RuntimeError('No lval found "%s"' % lval)
end = source.index(lval)