diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-16 15:44:07 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-16 15:45:59 -0700 |
| commit | af9dc0702568dc45b8809523dde760bb99aafbcb (patch) | |
| tree | 8334bab3a859aaa12ae5cb9f78b92f2eea5477b4 /core/operators.nom | |
| parent | 3ffeaf1f5dbf3e225dc536066d0fedda3f38ac70 (diff) | |
Converted DictEntry to be an actual tree, instead of a pseudo-tree, made 'parse % as %'
generate lua code with already-substituted tree literals instead of reparsing and
substituting at parse time, and made some general optimizations.
Diffstat (limited to 'core/operators.nom')
| -rw-r--r-- | core/operators.nom | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/operators.nom b/core/operators.nom index 60fe969..e3b41e1 100644 --- a/core/operators.nom +++ b/core/operators.nom @@ -66,7 +66,7 @@ immediately lua> ".." local lhs, rhs = Lua(tree.source), Lua(\%assignments.source); for i, item in ipairs(\%assignments.value) do - local target, value = item.key, item.value; + local target, value = item.value[1], item.value[2]; local target_lua = target:as_lua(nomsu); if not target_lua.is_value then error("Invalid target for assignment: "..target:get_src()); end local value_lua = value:as_lua(nomsu); @@ -102,7 +102,7 @@ immediately local lhs, rhs = Lua(tree.source), Lua(\%assignments.source); local vars = {}; for i, item in ipairs(\%assignments.value) do - local target, value = item.key, item.value; + local target, value = item.value[1], item.value[2]; if not target.type == "Var" then error("Invalid target for 'with' assignment: "..tostring(target.source:get_text())); end |
