From 72da4b04e42baf3743ecf54b207f446a570d55e2 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Tue, 7 Sep 2021 00:31:06 +0900 Subject: Add the semantic action API 'TrapAndShiftError' instead of 'TrapError' and 'ShiftError' --- driver/parser.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'driver/parser.go') 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) } } } -- cgit v1.2.3