aboutsummaryrefslogtreecommitdiff
path: root/lib/operators.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-01-08 18:53:57 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-01-08 18:53:57 -0800
commitf97ab858edae5495f8ebfef46656e86150665888 (patch)
treeed47620eba2365192ba54950647d6307223cac29 /lib/operators.nom
parent568a44ef191e1f4072d379700e3b6f599150a92b (diff)
Modernized the codebase a bit to include "immediately:" for immediately
running code before further parsing takes place. That means that in the default case, whole files can be run at once, which makes all but the weirdest edge cases make a lot more sense and operate smoothly.
Diffstat (limited to 'lib/operators.nom')
-rw-r--r--lib/operators.nom4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/operators.nom b/lib/operators.nom
index 59a9ad2..2f08089 100644
--- a/lib/operators.nom
+++ b/lib/operators.nom
@@ -51,9 +51,9 @@ compile [%var = %val] to code:
lua> ".."
if \%var.type == 'List' and \%val.type == 'List' then
local lhs = {};
- for i,x in ipairs(\%var.value) do lhs[i] = nomsu:tree_to_lua(x); end
+ for i,x in ipairs(\%var.value) do lhs[i] = nomsu:tree_to_lua(x).expr; end
local rhs = {};
- for i,x in ipairs(\%val.value) do rhs[i] = nomsu:tree_to_lua(x); end
+ for i,x in ipairs(\%val.value) do rhs[i] = nomsu:tree_to_lua(x).expr; end
return table.concat(lhs, ", ").." = "..table.concat(rhs, ", ")..";";
else
return \(%var as lua).." = "..\(%val as lua)..";";