From 4ee90773d9aa928ec274a59e7ed206692b74637b Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sat, 18 Nov 2023 22:54:46 +0100 Subject: ast: accept idents in string flags A subsequent commit will allow string flags to refer to other string flags (nested definitions). For that to happen, the parser must accept idents as part of the string flags definitions, as follows. strflags0 = "foo", strflags1 strflags1 = "bar" Signed-off-by: Paul Chaignon --- pkg/ast/testdata/errors.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/ast/testdata/errors.txt') diff --git a/pkg/ast/testdata/errors.txt b/pkg/ast/testdata/errors.txt index 2b022c149..266babf8f 100644 --- a/pkg/ast/testdata/errors.txt +++ b/pkg/ast/testdata/errors.txt @@ -21,8 +21,8 @@ int_flags4 = 1, -2- ### bad integer "-2-" str_flags0 = "foo", "bar" str_flags1 = "non terminated ### string literal is not terminated str_flags2 = "bad chars здесь" ### illegal character U+00D0 'Ð' in string literal -str_flags3 = "string", not a string ### unexpected identifier, expecting string, hex string -str_flags4 = "string", 42 ### unexpected int, expecting string, hex string +str_flags3 = "string", not a string ### unexpected identifier, expecting '\n' +str_flags4 = "string", 42 ### unexpected int, expecting string, hex string, identifier str_flags5 = `x` ### bad hex string literal: encoding/hex: invalid byte: U+0078 'x' call(foo ,int32 , bar int32) ### unexpected ',', expecting int, identifier, string -- cgit mrf-deployment