From a13655e3936ba9166051914832dedcbdb28b056c Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sun, 11 Apr 2021 16:41:05 +0900 Subject: Fix grammar the parser accepts * Add cases test the parse method. * Fix the parser to pass the cases. --- compiler/test_util_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/test_util_test.go') diff --git a/compiler/test_util_test.go b/compiler/test_util_test.go index 7e6896d..2ead2c9 100644 --- a/compiler/test_util_test.go +++ b/compiler/test_util_test.go @@ -1,5 +1,11 @@ package compiler +func newRangeSymbolNodeWithPos(from, to byte, pos symbolPosition) *symbolNode { + n := newRangeSymbolNode(from, to) + n.pos = pos + return n +} + func newSymbolNodeWithPos(v byte, pos symbolPosition) *symbolNode { n := newSymbolNode(v) n.pos = pos -- cgit v1.2.3