Error implements the error interface, returning a formatted error message with location information. Format: " at line , column " Example output: "unterminated string literal at line 5, column 23"
()
| 49 | // |
| 50 | // Example output: "unterminated string literal at line 5, column 23" |
| 51 | func (e *Error) Error() string { |
| 52 | return fmt.Sprintf("%s at line %d, column %d", e.Message, e.Location.Line, e.Location.Column) |
| 53 | } |
| 54 | |
| 55 | // NewError creates a new tokenization error with a message and location. |
| 56 | // |
no outgoing calls