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