From f97ab858edae5495f8ebfef46656e86150665888 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 8 Jan 2018 18:53:57 -0800 Subject: 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. --- lib/operators.nom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/operators.nom') 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)..";"; -- cgit v1.2.3