aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-08-28 01:55:06 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-08-28 14:53:50 +0900
commit4fda9eb3584cfcfd1e35267526442c022693f7ed (patch)
tree763c2af265d7677712fef58213e2b15321b1c654 /spec/syntax_error.go
parentAdd an #alias directive to define a user-friendly name of a terminal (diff)
downloadcotia-4fda9eb3584cfcfd1e35267526442c022693f7ed.tar.gz
cotia-4fda9eb3584cfcfd1e35267526442c022693f7ed.tar.xz
Support the escape sequecens \' and \\ in a string literal
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r--spec/syntax_error.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/syntax_error.go b/spec/syntax_error.go
index b427bed..f82186a 100644
--- a/spec/syntax_error.go
+++ b/spec/syntax_error.go
@@ -18,9 +18,11 @@ var (
// lexical errors
synErrAutoGenID = newSyntaxError("you cannot define an identifier beginning with an underscore")
synErrUnclosedTerminal = newSyntaxError("unclosed terminal")
+ synErrUnclosedString = newSyntaxError("unclosed string")
synErrInvalidEscSeq = newSyntaxError("invalid escape sequence")
synErrIncompletedEscSeq = newSyntaxError("incompleted escape sequence; unexpected EOF following a backslash")
synErrEmptyPattern = newSyntaxError("a pattern must include at least one character")
+ synErrEmptyString = newSyntaxError("a string must include at least one character")
synErrZeroPos = newSyntaxError("a position must be greater than or equal to 1")
// syntax errors