aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-10-05 15:00:01 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-10-05 15:00:01 -0700
commit4ae64ef9e34956235f8b5e2b60c1c8efaa7b913f (patch)
treecb0c507a8ddae5139759d4224dba961e8a003e3f /lib
parent7f9a08f3d630be2b687b3c63a7d39330a7ea87c6 (diff)
Fixed ternary operator.
Diffstat (limited to 'lib')
-rw-r--r--lib/operators.nom6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/operators.nom b/lib/operators.nom
index 17d7e34..85332a1 100644
--- a/lib/operators.nom
+++ b/lib/operators.nom
@@ -16,10 +16,10 @@ compile [%if_expr if %condition else %else_expr] to: ".."
#.. Note: this uses a function instead of (condition and if_expr or else_expr)
because that breaks if %if_expr is falsey.
|(function(nomsu, vars)
- | if \(%condition) then;
- | return \(%if_expr);
+ | if \(%condition as lua) then;
+ | return \(%if_expr as lua);
| else;
- | return \(%else_expr);
+ | return \(%else_expr as lua);
| end;
|end)(nomsu, vars)