diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-24 21:16:51 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-24 21:17:15 -0700 |
| commit | 64294f5cd6ab67236625cf4d645debafc35d0055 (patch) | |
| tree | db469d2e94f4d8479d02e7a390941c122025b423 /core/control_flow.nom | |
| parent | d9b795ee45d7a3c65bdd74da5ee042fac12cf5b8 (diff) | |
Removed the Word tree type and replaced it with raw strings, since
they're only used as part of Actions
Diffstat (limited to 'core/control_flow.nom')
| -rw-r--r-- | core/control_flow.nom | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/control_flow.nom b/core/control_flow.nom index 9f23e07..6d93e8a 100644 --- a/core/control_flow.nom +++ b/core/control_flow.nom @@ -271,7 +271,7 @@ immediately %condition: %func_call.2 %action: %func_call.3 .. - assume ((%star and (%star.type is "Word")) and (%star.value is "*")) or barf ".." + assume (%star = "*") or barf ".." Invalid format for 'when' statement. Lines must begin with '*' assume %condition or barf ".." Invalid format for 'when' statement. Lines must begin with '*' and have a condition or the word "else" @@ -279,7 +279,7 @@ immediately lua> "table.insert(\%fallthroughs, \(%condition as lua expr));" do next %func_call - if: (%condition.type is "Word") and (%condition.value is "else") + if: %condition = "else" assume (not %is_first) or barf "'else' clause cannot be first in 'when % = ?' block" to %code write "\nelse\n " to %code write: %action as lua statements @@ -315,7 +315,7 @@ immediately assume (%func_call.type is "Action") or barf ".." Invalid format for 'when' statement. Only '*' blocks are allowed. with {%star:%func_call.1, %condition:%func_call.2, %action:%func_call.3} - assume ((%star and (%star.type is "Word")) and (%star.value is "*")) or barf ".." + assume (%star = "*") or barf ".." Invalid format for 'when' statement. Lines must begin with '*' assume %condition or barf ".." Invalid format for 'when' statement. Lines must begin with '*' and have a condition or the word "else" @@ -323,7 +323,7 @@ immediately lua> "table.insert(\%fallthroughs, \(%condition as lua expr))" do next %func_call - if: (%condition.type is "Word") and (%condition.value is "else") + if: %condition = "else" assume (not %is_first) or barf "'else' clause cannot be first in 'when % = ?' block" to %code write "\nelse\n " to %code write: %action as lua statements |
