From 0baa69676ca83dbb4fe7241478a6ecf6c85418a9 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Thu, 22 Jul 2021 20:30:23 +0900 Subject: Add literal pattern syntax and change tree structure syntax - Literal patterns don't interpret the special characters of regular expressions. In other words, 'abc|def' matches only `abc|def`, not `abc` or `def`. - Change tree structure syntax from '(...) to #(...). --- spec/syntax_error.go | 1 + 1 file changed, 1 insertion(+) (limited to 'spec/syntax_error.go') diff --git a/spec/syntax_error.go b/spec/syntax_error.go index 9d67ccc..b427bed 100644 --- a/spec/syntax_error.go +++ b/spec/syntax_error.go @@ -20,6 +20,7 @@ var ( synErrUnclosedTerminal = newSyntaxError("unclosed terminal") 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") synErrZeroPos = newSyntaxError("a position must be greater than or equal to 1") // syntax errors -- cgit v1.2.3