diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-03-27 14:41:36 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-03-27 14:42:13 -0700 |
| commit | 8bf8877ff9fe4495772d9804e8c832fd0530abec (patch) | |
| tree | e1ee321160bf797817b7b8069025d9c08c8a16ea /lib/core | |
| parent | 8719641ace1228a9b650c27b8a575cb3d3c4c761 (diff) | |
Added support for $($foo, baz) as equivalent to $foo.baz.
Diffstat (limited to 'lib/core')
| -rw-r--r-- | lib/core/operators.nom | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/core/operators.nom b/lib/core/operators.nom index 187d2c7..dbc0b18 100644 --- a/lib/core/operators.nom +++ b/lib/core/operators.nom @@ -43,7 +43,7 @@ test: if i > 1 then lua:add(", ") end local assignment_lua = \($assignment as lua expr) lua:add(assignment_lua) - if \$assignment.type == 'Var' then + if \$assignment.type == 'Var' and \$assignment[1].type ~= "MethodCall" then lua:add_free_vars({assignment_lua:text()}) end end @@ -67,7 +67,7 @@ test: else local var_lua = \($var as lua expr) lua:add(var_lua) - if \$var.type == 'Var' then + if \$var.type == 'Var' and \$var[1].type ~= "MethodCall" then lua:add_free_vars({var_lua:text()}) end lua:add(' = ', \($value as lua expr), ';') |
