diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-22 16:13:33 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-22 16:13:33 -0700 |
| commit | 04d7edefa372f80160603ddd9039a7120527e4bc (patch) | |
| tree | 9b778704d6c09d3506f695e3f86cad7929a75bb0 /core/scopes.nom | |
| parent | 3e222b40ef43204305b54876d184d42871faf041 (diff) | |
Adding more inline tests.
Diffstat (limited to 'core/scopes.nom')
| -rw-r--r-- | core/scopes.nom | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/scopes.nom b/core/scopes.nom index a65b030..b725660 100644 --- a/core/scopes.nom +++ b/core/scopes.nom @@ -7,6 +7,20 @@ use "core/operators.nom" use "core/collections.nom" use "core/control_flow.nom" +test: + %x = "outer" + with local %x: + %x = "inner" + assume (%x == "inner") + + assume (%x == "outer") + action [foo] "outer foo" + with local [action (foo)]: + action [foo] "inner foo" + assume ((foo) == "inner foo") + + assume ((foo) == "outer foo") + compile [with local %locals %body, with local %locals do %body] to: %body_lua = (%body as lua statements) if %locals.type is: |
