aboutsummaryrefslogtreecommitdiff
path: root/driver/conflict_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-04-03 00:23:18 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-04-03 01:26:39 +0900
commit14b2d7e2728ab0314db56fc6e493d06fa285d006 (patch)
tree94b92e6307a570edeaae1a43a104e200981d18cc /driver/conflict_test.go
parentFix help documents (diff)
downloadurubu-14b2d7e2728ab0314db56fc6e493d06fa285d006.tar.gz
urubu-14b2d7e2728ab0314db56fc6e493d06fa285d006.tar.xz
Allow arbitrary user-defined types for nodes in a syntax tree
Diffstat (limited to 'driver/conflict_test.go')
-rw-r--r--driver/conflict_test.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/driver/conflict_test.go b/driver/conflict_test.go
index 1f8914f..7672c00 100644
--- a/driver/conflict_test.go
+++ b/driver/conflict_test.go
@@ -1,8 +1,6 @@
package driver
import (
- "fmt"
- "os"
"strings"
"testing"
@@ -363,8 +361,8 @@ assign: '=';
}
gram := NewGrammar(cg)
- treeAct := NewSyntaxTreeActionSet(gram, false, true)
- p, err := NewParser(toks, gram, SemanticAction(treeAct))
+ tb := NewDefaultSyntaxTreeBuilder()
+ p, err := NewParser(toks, gram, SemanticAction(NewCSTActionSet(gram, tb)))
if err != nil {
t.Fatal(err)
}
@@ -374,10 +372,9 @@ assign: '=';
t.Fatal(err)
}
- fmt.Printf("CST:\n")
- PrintTree(os.Stdout, treeAct.CST())
-
- testTree(t, treeAct.CST(), tt.cst)
+ if tt.cst != nil {
+ testTree(t, tb.Tree(), tt.cst)
+ }
})
}
}