aboutsummaryrefslogtreecommitdiff
path: root/spec/lexer_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-06-15 19:44:51 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-06-15 19:44:51 +0900
commit434ee1561016d0fd5099c755b150365b7a528c6b (patch)
tree682b822a8b30df0bcab5e132068232dce88360a4 /spec/lexer_test.go
parentAdd spec parser (diff)
downloadcotia-434ee1561016d0fd5099c755b150365b7a528c6b.tar.gz
cotia-434ee1561016d0fd5099c755b150365b7a528c6b.tar.xz
Add production syntax
Diffstat (limited to 'spec/lexer_test.go')
-rw-r--r--spec/lexer_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lexer_test.go b/spec/lexer_test.go
index e7ba3cc..1edf15c 100644
--- a/spec/lexer_test.go
+++ b/spec/lexer_test.go
@@ -14,11 +14,12 @@ func TestLexer_Run(t *testing.T) {
}{
{
caption: "the lexer can recognize all kinds of tokens",
- src: `id"terminal":;`,
+ src: `id"terminal":|;`,
tokens: []*token{
newIDToken("id"),
newTerminalPatternToken("terminal"),
newSymbolToken(tokenKindColon),
+ newSymbolToken(tokenKindOr),
newSymbolToken(tokenKindSemicolon),
newEOFToken(),
},