aboutsummaryrefslogtreecommitdiff
path: root/core/control_flow.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-04 17:56:09 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-04 17:57:07 -0700
commit563e415e07ea45df8c80fc9a2afc652e3e6d8c83 (patch)
tree1f752ef1009b5417e887ba56fe56559fa10e5165 /core/control_flow.nom
parente7bdc35aa82339f0734ec7014d2da0459ff0462d (diff)
Switched from Node(Tuple(values...), source) to Node(source, values...),
thanks to support from immutable-tables for mixed tables.
Diffstat (limited to 'core/control_flow.nom')
-rw-r--r--core/control_flow.nom24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/control_flow.nom b/core/control_flow.nom
index 77e55c6..f5c61e3 100644
--- a/core/control_flow.nom
+++ b/core/control_flow.nom
@@ -188,14 +188,14 @@ immediately
%body has subtree % where
(%.type = "Action") and
(%.stub is "do next %") and
- %.value.3.value = %var.value
+ %.3.value = %var.value
..: to %lua write (Lua "\n ::continue_\(%var as lua identifier)::")
to %lua write "\nend --foreach-loop"
if
%body has subtree % where
(%.type = "Action") and
(%.stub is "stop %") and
- %.value.2.value = %var.value
+ %.2.value = %var.value
..
%lua <-
Lua ".."
@@ -222,14 +222,14 @@ immediately
%body has subtree % where
(%.type = "Action") and
(%.stub is "do next %") and
- %.value.3.value = %key.value
+ %.3.value = %key.value
..: to %lua write (Lua "\n ::continue_\(%key as lua identifier)::")
if
%body has subtree % where
(%.type = "Action") and
(%.stub is "do next %") and
- %.value.3.value = %value.value
+ %.3.value = %value.value
..: to %lua write (Lua "\n ::continue_\(%value as lua identifier)::")
to %lua write "\nend --foreach-loop"
@@ -238,14 +238,14 @@ immediately
%body has subtree % where
(%.type = "Action") and
(%.stub is "stop %") and
- %.value.2.value = %key.value
+ %.2.value = %key.value
..: to %stop_labels write "\n::stop_\(%key as lua identifier)::"
if
%body has subtree % where
(%.type = "Action") and
(%.stub is "stop %") and
- %.value.2.value = %value.value
+ %.2.value = %value.value
..: to %stop_labels write "\n::stop_\(%value as lua identifier)::"
if: (length of %stop_labels) > 0
@@ -265,14 +265,14 @@ immediately
%is_first <- (yes)
%seen_else <- (no)
%branches <-
- %body.value if (%body.type = "Block") else [%body]
+ %body if (%body.type = "Block") else [%body]
for %func_call in %branches
assume (%func_call.type is "Action") or barf ".."
Invalid format for 'when' statement. Only '*' blocks are allowed.
with {..}
- %star: %func_call.value.1
- %condition: %func_call.value.2
- %action: %func_call.value.3
+ %star: %func_call.1
+ %condition: %func_call.2
+ %action: %func_call.3
..
assume (%star = "*") or barf ".."
Invalid format for 'when' statement. Lines must begin with '*'
@@ -313,11 +313,11 @@ immediately
%is_first <- (yes)
%seen_else <- (no)
%branches <-
- %body.value if (%body.type = "Block") else [%body]
+ %body if (%body.type = "Block") else [%body]
for %func_call in %branches
assume (%func_call.type is "Action") or barf ".."
Invalid format for 'when' statement. Only '*' blocks are allowed.
- with {%star:%func_call.value.1, %condition:%func_call.value.2, %action:%func_call.value.3}
+ with {%star:%func_call.1, %condition:%func_call.2, %action:%func_call.3}
assume (%star = "*") or barf ".."
Invalid format for 'when' statement. Lines must begin with '*'
assume %condition or barf ".."