aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-03-28 01:30:49 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-03-28 01:45:11 +0900
commit1746609e248151d575f6e3913ad5023fd421bfff (patch)
tree9312ac986191b3798125e2d3cc41518601d9b9e2 /spec/syntax_error.go
parentFollow golangci-lint (diff)
downloadcotia-1746609e248151d575f6e3913ad5023fd421bfff.tar.gz
cotia-1746609e248151d575f6e3913ad5023fd421bfff.tar.xz
Simplify the syntax of #ast directive
This change allows using the simple syntax of the directive like `#ast $1 $3...` instead of `#ast #(foo $1 $3...)`.
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r--spec/syntax_error.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/syntax_error.go b/spec/syntax_error.go
index a35a90c..ae65b35 100644
--- a/spec/syntax_error.go
+++ b/spec/syntax_error.go
@@ -25,14 +25,12 @@ var (
synErrZeroPos = newSyntaxError("a position must be greater than or equal to 1")
// syntax errors
- synErrInvalidToken = newSyntaxError("invalid token")
- synErrNoProductionName = newSyntaxError("a production name is missing")
- synErrNoColon = newSyntaxError("the colon must precede alternatives")
- synErrNoSemicolon = newSyntaxError("the semicolon is missing at the last of an alternative")
- synErrNoDirectiveName = newSyntaxError("a directive needs a name")
- synErrProdDirNoNewline = newSyntaxError("a production directive must be followed by a newline")
- synErrSemicolonNoNewline = newSyntaxError("a semicolon must be followed by a newline")
- synErrFragmentNoPattern = newSyntaxError("a fragment needs one pattern element")
- synErrTreeInvalidFirstElem = newSyntaxError("the first element of a tree structure must be an ID")
- synErrTreeUnclosed = newSyntaxError("unclosed tree structure")
+ synErrInvalidToken = newSyntaxError("invalid token")
+ synErrNoProductionName = newSyntaxError("a production name is missing")
+ synErrNoColon = newSyntaxError("the colon must precede alternatives")
+ synErrNoSemicolon = newSyntaxError("the semicolon is missing at the last of an alternative")
+ synErrNoDirectiveName = newSyntaxError("a directive needs a name")
+ synErrProdDirNoNewline = newSyntaxError("a production directive must be followed by a newline")
+ synErrSemicolonNoNewline = newSyntaxError("a semicolon must be followed by a newline")
+ synErrFragmentNoPattern = newSyntaxError("a fragment needs one pattern element")
)