aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-11 16:45:48 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-11 16:45:48 -0800
commit81fda963016bff77a25666f50cc3afb2f19878be (patch)
tree6181b360672f35764b7d89ad4729bf8cc87a6d15
parentc5ea506accd9518e4e5a83d98533f7d138805ffd (diff)
Updated to use 'set' syntax instead of ": yes"
-rw-r--r--core/collections.nom4
-rw-r--r--core/control_flow.nom2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/collections.nom b/core/collections.nom
index e9457e6..82b5dfb 100644
--- a/core/collections.nom
+++ b/core/collections.nom
@@ -15,11 +15,11 @@ test:
%visited = {}
for %i = %x in %list:
%visited.%i = (yes)
- assume (%visited == {1: yes, 2: yes, 3: yes, 4: yes, 5: yes})
+ assume (%visited == {1, 2, 3, 4, 5})
%visited = {}
for %x in %list:
%visited.%x = (yes)
- assume (%visited == {1: yes, 2: yes, 3: yes, 4: yes, 5: yes})
+ assume (%visited == {1, 2, 3, 4, 5})
assume ((%list::2 nd to last) == 4)
assume ((%list::first) == 1)
assume (%list::has 3)
diff --git a/core/control_flow.nom b/core/control_flow.nom
index d96e916..964250e 100644
--- a/core/control_flow.nom
+++ b/core/control_flow.nom
@@ -54,7 +54,7 @@ test:
..all compile 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):
+ if {"Text", "List", "Dict", "Number"}.(%when_true_expr.type):
return (Lua "(\(%condition as lua expr) and \(%when_true_expr as lua expr) or \(%when_false_expr as lua expr))")
..else:
# Otherwise, need to do an anonymous inline function (yuck, too bad lua