aboutsummaryrefslogtreecommitdiff
path: root/driver/parser.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-09-07 01:02:22 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-09-07 02:17:41 +0900
commit0cf26ed10f2563ea6721590ddbd5cccc7fa502b1 (patch)
treee6ef2c493a0b2573436a59a4e07d224d2c79497c /driver/parser.go
parentAdd the semantic action API 'TrapAndShiftError' instead of 'TrapError' and 'S... (diff)
downloadcotia-0cf26ed10f2563ea6721590ddbd5cccc7fa502b1.tar.gz
cotia-0cf26ed10f2563ea6721590ddbd5cccc7fa502b1.tar.xz
Call the 'MissError' when input doesn't meet an error production
Diffstat (limited to 'driver/parser.go')
-rw-r--r--driver/parser.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/parser.go b/driver/parser.go
index 522362e..3099d73 100644
--- a/driver/parser.go
+++ b/driver/parser.go
@@ -136,6 +136,10 @@ ACTION_LOOP:
return err
}
if tok.EOF {
+ if p.semAct != nil {
+ p.semAct.MissError()
+ }
+
return nil
}