aboutsummaryrefslogtreecommitdiff
path: root/driver/semantic_action_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-09-07 01:35:58 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-09-07 02:17:41 +0900
commita57fda765cd32b44cd069da1c9a442b701b36dc2 (patch)
treee8f72fbcac83fc18525263051e50d2b17f11ef24 /driver/semantic_action_test.go
parentCall the 'MissError' when input doesn't meet an error production (diff)
downloadurubu-a57fda765cd32b44cd069da1c9a442b701b36dc2.tar.gz
urubu-a57fda765cd32b44cd069da1c9a442b701b36dc2.tar.xz
Pass a token that caused a syntax error to the semantic action APIs
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 c3f8943..1d785e4 100644
--- a/driver/semantic_action_test.go
+++ b/driver/semantic_action_test.go
@@ -37,11 +37,11 @@ func (a *testSemAct) Accept() {
a.actLog = append(a.actLog, "accept")
}
-func (a *testSemAct) TrapAndShiftError(n int) {
- a.actLog = append(a.actLog, fmt.Sprintf("trap/%v/shift/error", n))
+func (a *testSemAct) TrapAndShiftError(cause *mldriver.Token, popped int) {
+ a.actLog = append(a.actLog, fmt.Sprintf("trap/%v/shift/error", popped))
}
-func (a *testSemAct) MissError() {
+func (a *testSemAct) MissError(cause *mldriver.Token) {
a.actLog = append(a.actLog, "miss")
}