diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-02 00:04:56 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-02 00:15:02 +0900 |
commit | 24d9877e822c400240a7e86cf8835971ed969ac7 (patch) | |
tree | f5bfca4fb67be35f5eadbda5249d31db79d331f9 /spec/syntax_error.go | |
parent | Simplify syntax of modifiers and semantic actions (diff) | |
download | urubu-24d9877e822c400240a7e86cf8835971ed969ac7.tar.gz urubu-24d9877e822c400240a7e86cf8835971ed969ac7.tar.xz |
Prohibit defining identifiers beginning with an underscore
Identifiers beginning with an underscore are used as auto-generated identifiers.
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r-- | spec/syntax_error.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 |