diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-22 23:36:19 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-22 23:36:19 +0900 |
commit | cf4f53332e9d99a3a9eccfe69e70f98769862c3a (patch) | |
tree | 5963589f931d899f2855b5b25919e8368c3575d5 /compiler/dfa_test.go | |
parent | Add name field to the lexical specification (diff) | |
download | tre-cf4f53332e9d99a3a9eccfe69e70f98769862c3a.tar.gz tre-cf4f53332e9d99a3a9eccfe69e70f98769862c3a.tar.xz |
Keep the order of AST nodes constant
Diffstat (limited to '')
-rw-r--r-- | compiler/dfa_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/dfa_test.go b/compiler/dfa_test.go index 2683815..74c9ba8 100644 --- a/compiler/dfa_test.go +++ b/compiler/dfa_test.go @@ -7,8 +7,11 @@ import ( ) func TestGenDFA(t *testing.T) { - root, symTab, err := parse(map[spec.LexModeKindID][]byte{ - 1: []byte("(a|b)*abb"), + root, symTab, err := parse([]*patternEntry{ + { + id: spec.LexModeKindIDMin, + pattern: []byte("(a|b)*abb"), + }, }, nil) if err != nil { t.Fatal(err) |