From 9251b462dae2ee808a57c17518697916e3db4c6f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 2 Oct 2017 20:17:52 -0700 Subject: Fixed one compiler bug with comments immediately after indenting --- lib/operators.nom | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/operators.nom b/lib/operators.nom index c15298f..17d7e34 100644 --- a/lib/operators.nom +++ b/lib/operators.nom @@ -13,10 +13,9 @@ compile [nop, pass] to code: "" # Ternary operator compile [%if_expr if %condition else %else_expr] to: ".." - |(function(nomsu, vars) - # TODO: fix compiler bug that breaks this code if comments immediately follow ".." #.. 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); | else; -- cgit v1.2.3