aboutsummaryrefslogtreecommitdiff
path: root/driver/semantic_action_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-10-27 22:21:39 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-10-27 22:21:39 +0900
commit1d0a67bb7e95038f97e5a6c66bd2705d65f0ab57 (patch)
tree6991fe79876207b7c66ef65de5d7aec27c62c08b /driver/semantic_action_test.go
parentGenerate the lexer source code (diff)
downloadcotia-1d0a67bb7e95038f97e5a6c66bd2705d65f0ab57.tar.gz
cotia-1d0a67bb7e95038f97e5a6c66bd2705d65f0ab57.tar.xz
Use maleeni v0.5.1
Diffstat (limited to 'driver/semantic_action_test.go')
-rw-r--r--driver/semantic_action_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver/semantic_action_test.go b/driver/semantic_action_test.go
index 1d785e4..889016b 100644
--- a/driver/semantic_action_test.go
+++ b/driver/semantic_action_test.go
@@ -16,10 +16,11 @@ type testSemAct struct {
}
func (a *testSemAct) Shift(tok *mldriver.Token, recovered bool) {
+ k := a.gram.LexicalSpecification.Maleeni.Spec.KindNames[tok.KindID]
if recovered {
- a.actLog = append(a.actLog, fmt.Sprintf("shift/%v/recovered", tok.KindName))
+ a.actLog = append(a.actLog, fmt.Sprintf("shift/%v/recovered", k))
} else {
- a.actLog = append(a.actLog, fmt.Sprintf("shift/%v", tok.KindName))
+ a.actLog = append(a.actLog, fmt.Sprintf("shift/%v", k))
}
}