diff options
Diffstat (limited to 'sci2jsyacc.py')
-rwxr-xr-x | sci2jsyacc.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sci2jsyacc.py b/sci2jsyacc.py index 00f3d542..5844b431 100755 --- a/sci2jsyacc.py +++ b/sci2jsyacc.py @@ -57,7 +57,13 @@ JOB_BLOCKS = {} FUNCTION_VARS = set() LOCAL_VARS = set() -GLOBAL_VARS = {'x'} +GLOBAL_VARS = { + 'exprs', + 'gr_i', + 'graphics', + 'model', + 'x', +} VAR_TYPES = {} @@ -530,7 +536,7 @@ def p_lterm_assignment_expression(p): else: prefix = '' value = p[3][0] - if var == 'gr_i' and value == '[]': + if var == 'this.gr_i' and value == '[]': value = 'new ScilabString(["xstringb(orig(1),orig(2),\\"%s\\",sz(1),sz(2));"])' % (SCICOS_BLOCK_NAME) if var in LOCAL_VARS and '.' not in var: prefix = 'var ' |