diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-06-20 23:47:29 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-06-20 23:47:29 +0900 |
commit | 8ab850528e1c05f36668f36db6af4cdcb647180e (patch) | |
tree | cf1e373ebd76c6ad78d65c79351b2198c7e42b2a /spec/lexer_test.go | |
parent | Add skip action (diff) | |
download | cotia-8ab850528e1c05f36668f36db6af4cdcb647180e.tar.gz cotia-8ab850528e1c05f36668f36db6af4cdcb647180e.tar.xz |
Add syntax of fragment
Diffstat (limited to 'spec/lexer_test.go')
-rw-r--r-- | spec/lexer_test.go | 8 |
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{ |