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