diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-28 01:55:06 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-28 14:53:50 +0900 |
commit | 4fda9eb3584cfcfd1e35267526442c022693f7ed (patch) | |
tree | 763c2af265d7677712fef58213e2b15321b1c654 /spec/syntax_error.go | |
parent | Add an #alias directive to define a user-friendly name of a terminal (diff) | |
download | urubu-4fda9eb3584cfcfd1e35267526442c022693f7ed.tar.gz urubu-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.go | 2 |
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 |