diff options
Diffstat (limited to 'spec/lexer_test.go')
-rw-r--r-- | spec/lexer_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lexer_test.go b/spec/lexer_test.go index 51e5f59..c3540f6 100644 --- a/spec/lexer_test.go +++ b/spec/lexer_test.go @@ -16,6 +16,10 @@ func TestLexer_Run(t *testing.T) { return newTerminalPatternToken(text, newPosition(1, 0)) } + strTok := func(text string) *token { + return newStringLiteralToken(text, newPosition(1, 0)) + } + symTok := func(kind tokenKind) *token { return newSymbolToken(kind, newPosition(1, 0)) } @@ -40,7 +44,7 @@ func TestLexer_Run(t *testing.T) { tokens: []*token{ idTok("id"), termPatTok("terminal"), - termPatTok(`\.\*\+\?\|\(\)\[\\`), + strTok(`.*+?|()[\`), symTok(tokenKindColon), symTok(tokenKindOr), symTok(tokenKindSemicolon), |