From 53a9d4eae888d2b09c68fcd5dc14ae51f5d07c31 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 10 Jan 2018 20:45:03 -0800 Subject: Pretty much mostly working. --- lib/operators.nom | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/operators.nom') diff --git a/lib/operators.nom b/lib/operators.nom index 2f08089..1670191 100644 --- a/lib/operators.nom +++ b/lib/operators.nom @@ -20,13 +20,13 @@ compile [..] %when_false_expr unless %condition else %when_true_expr %when_false_expr unless %condition then %when_true_expr ..to: ".." - (function(nomsu, vars) - if \(%condition as lua) then + (function(nomsu, condition) + if condition then return \(%when_true_expr as lua); else return \(%when_false_expr as lua); end - end)(nomsu, vars) + end)(nomsu, \(%condition as lua)) parse [..] %true if %x == %y else %false, %true if %x == %y otherwise %false %false unless %x == %y else %true, %false unless %x == %y otherwise %true -- cgit v1.2.3