aboutsummaryrefslogtreecommitdiff
path: root/tests/variable/scope-specific
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-11-14 12:55:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-11-14 13:20:08 +0200
commit5ec57d68a5205173a02c34a24d7129347d43196c (patch)
tree303de46753bcde9f9ccff094d6591b6bb7583931 /tests/variable/scope-specific
parent62a688e3fd7d1fdb8ce5590ebe9cb99e90cbe5d7 (diff)
Tighten up attribute recognition during parsing
Now it should be possible to use `[]` for wildcard patterns, for example: foo = foo.[hit]xx Note that a leading bracket expression will still be recognized as attributes and escaping or quoting it will inhibit pattern matching. To resolve this case we need to specify an empty attribute list: foo = [] [abc]-foo.cxx
Diffstat (limited to 'tests/variable/scope-specific')
-rw-r--r--tests/variable/scope-specific/testscript17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/variable/scope-specific/testscript b/tests/variable/scope-specific/testscript
index 27210f9..111bbd9 100644
--- a/tests/variable/scope-specific/testscript
+++ b/tests/variable/scope-specific/testscript
@@ -9,14 +9,11 @@
$* <<EOI >>EOO
x = x
foo/ x = X
-foo/ [uint64] y=00
print $x
print $(foo/ x)
-print $(foo/ y)
EOI
x
X
-0
EOO
: basic-block
@@ -37,12 +34,20 @@ x
0
EOO
-: expect-assignment
+: unexpected-newline
+:
+$* <<EOI 2>>EOE != 0
+foo/ y
+EOI
+<stdin>:1:7: error: unexpected <newline> after foo/ y
+EOE
+
+: expected-varname
:
$* <<EOI 2>>EOE != 0
-foo/ [uint64] y
+foo/ [uint64] y = 0
EOI
-<stdin>:1:16: error: expected variable assignment instead of <newline>
+<stdin>:1:1: error: expected variable name instead of foo/ [uint64] y
EOE
: unexpected-attribute