From 8bf8877ff9fe4495772d9804e8c832fd0530abec Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 27 Mar 2019 14:41:36 -0700 Subject: Added support for $($foo, baz) as equivalent to $foo.baz. --- lib/core/operators.nom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/core') 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), ';') -- cgit v1.2.3