diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-10 22:50:45 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-10 22:50:50 -0700 |
| commit | ca1cfb5650dee7686700f2c1e48c37ed559bd14d (patch) | |
| tree | cf0a9cdb2f6756e769eee3919b1d72e09c52aee2 /tests/scopes.nom | |
| parent | 4126589afef1c3c14cfa5a3a0f43cc6e98569f1d (diff) | |
Added scoping test.
Diffstat (limited to 'tests/scopes.nom')
| -rw-r--r-- | tests/scopes.nom | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/scopes.nom b/tests/scopes.nom new file mode 100644 index 0000000..80791a5 --- /dev/null +++ b/tests/scopes.nom @@ -0,0 +1,25 @@ +use "core" + +using + %x <- 99 +..do + assume: %x = 99 + +using + action [foo] + return 99 + +..do + assume: (foo) = 99 + +action [baz] + return "outer" + +using + action [baz] + return "inner" +..do + assume: (baz) = "inner" +assume: (baz) = "outer" + +say "Scopes test passed." |
