diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-07 00:31:06 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-07 02:17:41 +0900 |
commit | 72da4b04e42baf3743ecf54b207f446a570d55e2 (patch) | |
tree | a4e126afcb0fa39b20075af3849ba1105c6c9a84 /driver/parser.go | |
parent | Change semantic action APIs (diff) | |
download | urubu-72da4b04e42baf3743ecf54b207f446a570d55e2.tar.gz urubu-72da4b04e42baf3743ecf54b207f446a570d55e2.tar.xz |
Add the semantic action API 'TrapAndShiftError' instead of 'TrapError' and 'ShiftError'
Diffstat (limited to 'driver/parser.go')
-rw-r--r-- | driver/parser.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/driver/parser.go b/driver/parser.go index af257e2..522362e 100644 --- a/driver/parser.go +++ b/driver/parser.go @@ -158,9 +158,6 @@ ACTION_LOOP: return nil } - if p.semAct != nil { - p.semAct.TrapError(count) - } p.onError = true p.shiftCount = 0 @@ -173,7 +170,7 @@ ACTION_LOOP: p.shift(act * -1) if p.semAct != nil { - p.semAct.ShiftError() + p.semAct.TrapAndShiftError(count) } } } |