(ctx any, format string, args ...any)
| 903 | } |
| 904 | |
| 905 | func (p *parser) reportError(ctx any, format string, args ...any) ast.Expr { |
| 906 | var location common.Location |
| 907 | err := p.helper.newExpr(ctx) |
| 908 | switch c := ctx.(type) { |
| 909 | case common.Location: |
| 910 | location = c |
| 911 | case antlr.Token, antlr.ParserRuleContext: |
| 912 | location = p.helper.getLocation(err.ID()) |
| 913 | } |
| 914 | // Provide arguments to the report error. |
| 915 | p.errors.reportErrorAtID(err.ID(), location, format, args...) |
| 916 | return err |
| 917 | } |
| 918 | |
| 919 | // ANTLR Parse listener implementations |
| 920 | func (p *parser) SyntaxError(recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException) { |
no test coverage detected