From af9dc0702568dc45b8809523dde760bb99aafbcb Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 16 May 2018 15:44:07 -0700 Subject: 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. --- core/operators.nom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/operators.nom') 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 -- cgit v1.2.3