aboutsummaryrefslogtreecommitdiff
path: root/driver/semantic_action_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-03-27 02:32:22 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-03-27 20:25:04 +0900
commitd0431e3a435e2ad3180d945f66098c04ed0faf22 (patch)
tree2963de49b509e639153091cf259eae4cfc51814e /driver/semantic_action_test.go
parentUse a lexer via interface (diff)
downloadurubu-d0431e3a435e2ad3180d945f66098c04ed0faf22.tar.gz
urubu-d0431e3a435e2ad3180d945f66098c04ed0faf22.tar.xz
Add vartan-go command
Diffstat (limited to 'driver/semantic_action_test.go')
-rw-r--r--driver/semantic_action_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/semantic_action_test.go b/driver/semantic_action_test.go
index 9c66a85..791b5f0 100644
--- a/driver/semantic_action_test.go
+++ b/driver/semantic_action_test.go
@@ -14,7 +14,7 @@ type testSemAct struct {
actLog []string
}
-func (a *testSemAct) Shift(tok Token, recovered bool) {
+func (a *testSemAct) Shift(tok VToken, recovered bool) {
t := a.gram.ParsingTable.Terminals[tok.TerminalID()]
if recovered {
a.actLog = append(a.actLog, fmt.Sprintf("shift/%v/recovered", t))
@@ -37,11 +37,11 @@ func (a *testSemAct) Accept() {
a.actLog = append(a.actLog, "accept")
}
-func (a *testSemAct) TrapAndShiftError(cause Token, popped int) {
+func (a *testSemAct) TrapAndShiftError(cause VToken, popped int) {
a.actLog = append(a.actLog, fmt.Sprintf("trap/%v/shift/error", popped))
}
-func (a *testSemAct) MissError(cause Token) {
+func (a *testSemAct) MissError(cause VToken) {
a.actLog = append(a.actLog, "miss")
}