From 563e415e07ea45df8c80fc9a2afc652e3e6d8c83 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 4 Jun 2018 17:56:09 -0700 Subject: Switched from Node(Tuple(values...), source) to Node(source, values...), thanks to support from immutable-tables for mixed tables. --- core/operators.nom | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/operators.nom') diff --git a/core/operators.nom b/core/operators.nom index 9b6b68a..5222a69 100644 --- a/core/operators.nom +++ b/core/operators.nom @@ -72,8 +72,8 @@ immediately Expected a Dict for the assignments part of '<- %' statement, not \%assignments lua> ".." local lhs, rhs = Lua(tree.source), Lua(tree.source) - for i, item in ipairs(\%assignments.value) do - local \%target, \%value = item.value[1], item.value[2] + for i, item in ipairs(\%assignments) do + local \%target, \%value = item[1], item[2] \%value = \%value:map(function(t) if Action:is_instance(t) and t.stub == "?" then return \%target @@ -105,7 +105,7 @@ immediately compile [with external %externs %body] to %body_lua <- (%body as lua statements) - lua> "\%body_lua:remove_free_vars(\%externs.value);" + lua> "\%body_lua:remove_free_vars(\%externs);" return %body_lua compile [with %assignments %body] to @@ -113,8 +113,8 @@ immediately lua> ".." local lhs, rhs = Lua(tree.source), Lua(tree.source) local vars = {} - for i, item in ipairs(\%assignments.value) do - local \%target, \%value = item.value[1], item.value[2] + for i, item in ipairs(\%assignments) do + local \%target, \%value = item[1], item[2] if not \%target.type == "Var" then error("Invalid target for 'with' assignment: "..tostring(\%target)) end -- cgit v1.2.3