aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-07-02 00:04:56 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-07-02 00:15:02 +0900
commit24d9877e822c400240a7e86cf8835971ed969ac7 (patch)
treef5bfca4fb67be35f5eadbda5249d31db79d331f9 /spec/syntax_error.go
parentSimplify syntax of modifiers and semantic actions (diff)
downloadurubu-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.go3
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