aboutsummaryrefslogtreecommitdiff
path: root/spec/lexer_test.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/lexer_test.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/lexer_test.go')
-rw-r--r--spec/lexer_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/lexer_test.go b/spec/lexer_test.go
index 43b192f..08939ee 100644
--- a/spec/lexer_test.go
+++ b/spec/lexer_test.go
@@ -40,7 +40,7 @@ func TestLexer_Run(t *testing.T) {
}{
{
caption: "the lexer can recognize all kinds of tokens",
- src: `id"terminal"'string':|;#()$1...#%`,
+ src: `id"terminal"'string':|;$1...#%`,
tokens: []*token{
idTok("id"),
termPatTok("terminal"),
@@ -48,8 +48,6 @@ func TestLexer_Run(t *testing.T) {
symTok(tokenKindColon),
symTok(tokenKindOr),
symTok(tokenKindSemicolon),
- symTok(tokenKindTreeNodeOpen),
- symTok(tokenKindTreeNodeClose),
posTok(1),
symTok(tokenKindExpantion),
symTok(tokenKindDirectiveMarker),