From 97d36965cbb30108340727a982539e67dafea92d Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Thu, 14 Apr 2022 02:11:06 +0900 Subject: Add tests for compiler --- spec/parser_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/parser_test.go') diff --git a/spec/parser_test.go b/spec/parser_test.go index 0772dae..2a44acd 100644 --- a/spec/parser_test.go +++ b/spec/parser_test.go @@ -183,6 +183,11 @@ c: ; }, }, }, + { + caption: "`fragment` is a reserved word", + src: `fragment: 'fragment';`, + synErr: synErrNoProductionName, + }, { caption: "when a source contains an unknown token, the parser raises a syntax error", src: `a: !;`, -- cgit v1.2.3