aboutsummaryrefslogtreecommitdiff
path: root/core/metaprogramming.nom
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/metaprogramming.nom
parent69aaea030e08e083151aa25b8080eddd0d4c1683 (diff)
Fixing the upgrade pipeline, plus some misc. fixes.
Diffstat (limited to 'core/metaprogramming.nom')
-rw-r--r--core/metaprogramming.nom6
1 files changed, 4 insertions, 2 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"