diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-04 17:56:09 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-04 17:57:07 -0700 |
| commit | 563e415e07ea45df8c80fc9a2afc652e3e6d8c83 (patch) | |
| tree | 1f752ef1009b5417e887ba56fe56559fa10e5165 /core/operators.nom | |
| parent | e7bdc35aa82339f0734ec7014d2da0459ff0462d (diff) | |
Switched from Node(Tuple(values...), source) to Node(source, values...),
thanks to support from immutable-tables for mixed tables.
Diffstat (limited to 'core/operators.nom')
| -rw-r--r-- | core/operators.nom | 10 |
1 files changed, 5 insertions, 5 deletions
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 |
