(msg string)
| 44 | } |
| 45 | |
| 46 | func (l *Parser) Error(msg string) { |
| 47 | pos := &position.Position{ |
| 48 | StartLine: l.currentToken.StartLine, |
| 49 | EndLine: l.currentToken.EndLine, |
| 50 | StartPos: l.currentToken.StartPos, |
| 51 | EndPos: l.currentToken.EndPos, |
| 52 | } |
| 53 | |
| 54 | l.Lexer.AddError(errors.NewError(msg, pos)) |
| 55 | } |
| 56 | |
| 57 | func (l *Parser) WithFreeFloating() { |
| 58 | l.Lexer.SetWithFreeFloating(true) |