aboutsummaryrefslogtreecommitdiff
path: root/spec/lexer_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-06-20 23:47:29 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-06-20 23:47:29 +0900
commit8ab850528e1c05f36668f36db6af4cdcb647180e (patch)
treecf1e373ebd76c6ad78d65c79351b2198c7e42b2a /spec/lexer_test.go
parentAdd skip action (diff)
downloadurubu-8ab850528e1c05f36668f36db6af4cdcb647180e.tar.gz
urubu-8ab850528e1c05f36668f36db6af4cdcb647180e.tar.xz
Add syntax of fragment
Diffstat (limited to 'spec/lexer_test.go')
-rw-r--r--spec/lexer_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lexer_test.go b/spec/lexer_test.go
index af586f2..7701ce7 100644
--- a/spec/lexer_test.go
+++ b/spec/lexer_test.go
@@ -27,6 +27,14 @@ func TestLexer_Run(t *testing.T) {
},
},
{
+ caption: "the lexer can recognize keywords",
+ src: `fragment`,
+ tokens: []*token{
+ newSymbolToken(tokenKindKWFragment),
+ newEOFToken(),
+ },
+ },
+ {
caption: "the lexer can recognize character sequences and escape sequences in terminal",
src: `"abc\"\\"`,
tokens: []*token{