diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-18 17:41:40 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-18 17:41:57 -0700 |
| commit | dcb380f1f6ec67c52364b1246546f1f6b2c168d3 (patch) | |
| tree | 753fb10223e5b7cc4222106bc33d3f1fe2eb3e07 /core/metaprogramming.nom | |
| parent | ec17442090e3a193c95d5fd53ef0016ecb53b230 (diff) | |
More cleanup, slowly working through operators/control_flow
Diffstat (limited to 'core/metaprogramming.nom')
| -rw-r--r-- | core/metaprogramming.nom | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index 011d44d..7ea437e 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -26,7 +26,7 @@ immediately: local body_lua = \%lua:as_lua(nomsu); body_lua:convert_to_statements("return "); body_lua:declare_locals(args); - lua:append(")\\n ", body_lua, "\\nend);") + lua:append(")\\n ", body_lua, "\\nend);"); return lua; end); @@ -75,7 +75,7 @@ immediately: local template; if \%longhand.type == "Block" then local lines = {}; - for i, line in ipairs(\%longhand.value) do lines[i] = line.source:get_text(); end + for i, line in ipairs(\%longhand.value) do lines[i] = tostring(line.source:get_text()); end template = repr(table.concat(lines, "\\n")); else template = repr(tostring(\%longhand.source:get_text())); @@ -117,7 +117,7 @@ immediately: lua> ".." local lua = \%tree:as_lua(nomsu); lua:convert_to_statements(); - lua:declare_locals(); + --lua:declare_locals(); return lua; action [%tree as value]: @@ -127,7 +127,7 @@ immediately: =lua "nomsu:tree_to_stub(\%tree)" immediately: - parse [%var write code %code] as: lua> "\%var:append(\%code);" + parse [%var <-write %code] as: lua> "\%var:append(\%code);" immediately: compile [%tree's source code, %tree' source code] to: Lua value "\(%tree as lua expr).source:get_text()" |
