From 8ab850528e1c05f36668f36db6af4cdcb647180e Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sun, 20 Jun 2021 23:47:29 +0900 Subject: Add syntax of fragment --- spec/lexer_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/lexer_test.go') 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 @@ -26,6 +26,14 @@ func TestLexer_Run(t *testing.T) { newEOFToken(), }, }, + { + 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\"\\"`, -- cgit v1.2.3