aboutsummaryrefslogtreecommitdiff
path: root/core/metaprogramming.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-09 14:36:15 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-09 14:37:22 -0800
commit7d2b7199d87930096b7fd799709fe0105d51eccb (patch)
treef33de61cb44357497758bb08ec6993753d8baa43 /core/metaprogramming.nom
parentba96cdfa07cea15ada62f8f89b2563de1286a0de (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.nom5
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"