aboutsummaryrefslogtreecommitdiff
path: root/core/control_flow.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-10-29 13:00:08 -0700
committerBruce Hill <bruce@bruce-hill.com>2018-10-29 13:00:30 -0700
commit23abab4f809e8d4b825746580082292db700036b (patch)
tree8eb95a3b781547abedadd08705a6e6291662737c /core/control_flow.nom
parentbe1df7ccd3fb5352ca666129aee93c56b5b27b40 (diff)
Some cleanups and fixes, made the parser more permissive of prematurely
terminated files.
Diffstat (limited to 'core/control_flow.nom')
-rw-r--r--core/control_flow.nom4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/control_flow.nom b/core/control_flow.nom
index 48b9c85..37b2b9c 100644
--- a/core/control_flow.nom
+++ b/core/control_flow.nom
@@ -53,7 +53,7 @@ compile [..]
%when_true_expr if %condition otherwise %when_false_expr
%when_false_expr unless %condition else %when_true_expr
%when_false_expr unless %condition then %when_true_expr
-..to (..)
+..to:
# If %when_true_expr is guaranteed to be truthy, we can use Lua's idiomatic
equivalent of a conditional expression: (cond and if_true or if_false)
if {Text:yes, List:yes, Dict:yes, Number:yes}.(%when_true_expr.type):
@@ -541,7 +541,7 @@ test:
assume (sorted %flat) == [1, 2, 3, 4, 5, 6]
# Recurion control flow
-compile [for %var in recursive %structure %body] to (..)
+compile [for %var in recursive %structure %body] to:
with local compile actions:
define mangler
compile [recurse %v on %x] to (..)