()
| 141 | } |
| 142 | |
| 143 | func (p *Parser) error() error { |
| 144 | if len(p.errors.errors) == 0 { |
| 145 | return nil |
| 146 | } |
| 147 | var buf strings.Builder |
| 148 | for _, e := range p.errors.errors { |
| 149 | buf.WriteString(fmt.Sprintf("%d:%d %s\n", e.Line, e.Column, e.Message)) |
| 150 | } |
| 151 | return errors.New(buf.String()) |
| 152 | } |
| 153 | |
| 154 | // Visit is the Visitor implementation. |
| 155 | func (p *Parser) Visit(tree antlr.ParseTree) any { |
no test coverage detected