diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-18 18:10:59 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-18 18:11:09 -0700 |
| commit | f83cc3ad8afaa122867270a9b1255295e902c422 (patch) | |
| tree | 6d91f47c05f7173e3e447ae4f1412442edd6f6b2 /core/control_flow.nom | |
| parent | a22de3fdbbebb310a07252bd99b1ca8acb685ea6 (diff) | |
More streamlining and cleanup.
Diffstat (limited to 'core/control_flow.nom')
| -rw-r--r-- | core/control_flow.nom | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/control_flow.nom b/core/control_flow.nom index fccdfca..5a96d3e 100644 --- a/core/control_flow.nom +++ b/core/control_flow.nom @@ -152,7 +152,7 @@ compile [..] %body has subtree % where (%.type = "Action") and (%.stub is "do next %") and - %.3 = %var + %.(3).1 = %var.1 ..: to %lua write "\n ::continue_\(%var as lua identifier)::" to %lua write "\nend --numeric for-loop" @@ -160,7 +160,7 @@ compile [..] %body has subtree % where (%.type = "Action") and (%.stub is "stop %") and - %.2 = %var + %.(2).1 = %var.1 .. %lua <- Lua ".." @@ -246,7 +246,7 @@ compile [..] %.2.(1) = %value.(1) ..: to %stop_labels write "\n::stop_\(%value as lua identifier)::" - if: (length of %stop_labels) > 0 + if: (length of "\%stop_labels") > 0 %lua <- Lua ".." do -- scope for stopping for % = % loop @@ -300,7 +300,7 @@ compile [when %body] to %is_first <- (no) assume (%fallthroughs = []) or barf "Unfinished fallthrough conditions in 'when' block" - assume ((length of %code) > 0) or barf "Empty body for 'when' block" + assume ((length of "\%code") > 0) or barf "Empty body for 'when' block" to %code write "\nend --when" return %code @@ -346,7 +346,7 @@ compile [when %branch_value = ? %body, when %branch_value is ? %body] to %is_first <- (no) assume (%fallthroughs = []) or barf "Unfinished fallthrough conditions in 'when' block" - assume ((length of %code) > 0) or barf "No body for 'when % = ?' block!" + assume ((length of "\%code") > 0) or barf "No body for 'when % = ?' block!" to %code write "\nend" %code <- Lua ".." |
