From 5ec57d68a5205173a02c34a24d7129347d43196c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Nov 2019 12:55:54 +0200 Subject: 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 --- tests/variable/scope-specific/testscript | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'tests') 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 @@ $* <>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 +: +$* <>EOE != 0 +foo/ y +EOI +:1:7: error: unexpected after foo/ y +EOE + +: expected-varname : $* <>EOE != 0 -foo/ [uint64] y +foo/ [uint64] y = 0 EOI -:1:16: error: expected variable assignment instead of +:1:1: error: expected variable name instead of foo/ [uint64] y EOE : unexpected-attribute -- cgit v1.1