From 24d9877e822c400240a7e86cf8835971ed969ac7 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Fri, 2 Jul 2021 00:04:56 +0900 Subject: Prohibit defining identifiers beginning with an underscore Identifiers beginning with an underscore are used as auto-generated identifiers. --- spec/syntax_error.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec/syntax_error.go') diff --git a/spec/syntax_error.go b/spec/syntax_error.go index cefde12..59ef62d 100644 --- a/spec/syntax_error.go +++ b/spec/syntax_error.go @@ -18,9 +18,10 @@ func (e *SyntaxError) Error() string { var ( // lexical errors + synErrAutoGenID = newSyntaxError("you cannot define an identifier beginning with an underscore") synErrUnclosedTerminal = newSyntaxError("unclosed terminal") synErrInvalidEscSeq = newSyntaxError("invalid escape sequence") - synErrIncompletedEscSeq = newSyntaxError("incompleted escape sequence; unexpected EOF following \\") + synErrIncompletedEscSeq = newSyntaxError("incompleted escape sequence; unexpected EOF following a backslash") synErrZeroPos = newSyntaxError("a position must be greater than or equal to 1") // syntax errors -- cgit v1.2.3