aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-09 17:02:39 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-09 17:02:53 -0800
commitfa3f598fc3b91d92665fda293460944f75c95b67 (patch)
treea5d19eac16d81873ab51171bdd5670793baa4ff8 /core
parent69aaea030e08e083151aa25b8080eddd0d4c1683 (diff)
Fixing the upgrade pipeline, plus some misc. fixes.
Diffstat (limited to 'core')
-rw-r--r--core/metaprogramming.nom6
-rw-r--r--core/text.nom2
2 files changed, 5 insertions, 3 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index fc81e15..b27147d 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -365,8 +365,10 @@ test:
# Return statement is wrapped in a do..end block because Lua is unhappy if you
put code after a return statement, unless you wrap it in a block.
-(return) compiles to "do return; end"
-(return %return_value) compiles to "do return \(%return_value as lua expr) end"
+(return %return_value) compiles to "\
+ ..do return \(..)
+ =lua "\%return_value and \(%return_value as lua expr) or ''"
+ .. end"
# Literals
(yes) compiles to "true"
diff --git a/core/text.nom b/core/text.nom
index d4cd227..28944dd 100644
--- a/core/text.nom
+++ b/core/text.nom
@@ -36,7 +36,7 @@ test:
return (..)
Lua "\
..(function()
- local \(mangle "comprehension") = _List{}
+ local \(mangle "comprehension") = List{}
for \(%match as lua expr) in (\(%text as lua expr)):gmatch(\(..)
%patt as lua expr
..) do