diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-09 14:36:15 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-09 14:37:22 -0800 |
| commit | 7d2b7199d87930096b7fd799709fe0105d51eccb (patch) | |
| tree | f33de61cb44357497758bb08ec6993753d8baa43 /core/metaprogramming.nom | |
| parent | ba96cdfa07cea15ada62f8f89b2563de1286a0de (diff) | |
Lots of cleanups, including expanded use of (... compiles to "text
literal") shorthand, deprecating Lua value, and more use of Lua "..."
with text interpolations.
Diffstat (limited to 'core/metaprogramming.nom')
| -rw-r--r-- | core/metaprogramming.nom | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index be7450a..2ae8b1b 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -71,9 +71,8 @@ lua> "\ if \%body.type == "Text" then \%body = SyntaxTree{source=\%body.source, type="Action", "Lua", \%body} end - local lua = LuaCode(tree.source, "compile.action[", \%action.stub:as_lua(), + return LuaCode(tree.source, "compile.action[", \%action.stub:as_lua(), "] = ", \(what (%args -> %body) compiles to)) - return lua end" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -332,7 +331,7 @@ test: ..one "two"" ..== "\"one\\n\\\"two\\\"\"" -(quote %s) compiles to (Lua "tostring(\(%s as lua expr)):as_lua()") +(quote %s) compiles to "tostring(\(%s as lua expr)):as_lua()" test: assume (lua type of {}) == "table" |
