aboutsummaryrefslogtreecommitdiff
path: root/compiler/test_util_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-04-11 16:41:05 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-04-11 16:41:05 +0900
commita13655e3936ba9166051914832dedcbdb28b056c (patch)
treec6fcd27c4769aecf16d4f8d2a43f1297f62b6caa /compiler/test_util_test.go
parentAdd logging to compile command (diff)
downloadtre-a13655e3936ba9166051914832dedcbdb28b056c.tar.gz
tre-a13655e3936ba9166051914832dedcbdb28b056c.tar.xz
Fix grammar the parser accepts
* Add cases test the parse method. * Fix the parser to pass the cases.
Diffstat (limited to 'compiler/test_util_test.go')
-rw-r--r--compiler/test_util_test.go6
1 files changed, 6 insertions, 0 deletions
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