From a443f0a1a4b79faa0b0271b72ea4a8e5f3d03ffd Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sat, 14 May 2022 14:42:00 +0900 Subject: Prohibit applying the expansion operator to anything other than identifiers --- spec/syntax_error.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spec/syntax_error.go') diff --git a/spec/syntax_error.go b/spec/syntax_error.go index cf64e75..db4c381 100644 --- a/spec/syntax_error.go +++ b/spec/syntax_error.go @@ -37,6 +37,8 @@ var ( synErrNoDirectiveName = newSyntaxError("a directive needs a name") synErrNoOrderedSymbolName = newSyntaxError("an ordered symbol name is missing") synErrUnclosedDirGroup = newSyntaxError("a directive group must be closed by )") + synErrStrayExpOp = newSyntaxError("an expansion operator ... must be preceded by an identifier") + synErrInvalidExpOperand = newSyntaxError("an expansion operator ... can be applied to only an identifier") synErrSemicolonNoNewline = newSyntaxError("a semicolon must be followed by a newline") synErrFragmentNoPattern = newSyntaxError("a fragment needs one pattern element") ) -- cgit v1.2.3