NewError creates a new tokenization error with a message and location. Parameters: - message: Human-readable description of the error - location: Position in the input where the error occurred Returns a pointer to an Error with the specified message and location.
(message string, location models.Location)
| 60 | // |
| 61 | // Returns a pointer to an Error with the specified message and location. |
| 62 | func NewError(message string, location models.Location) *Error { |
| 63 | return &Error{ |
| 64 | Message: message, |
| 65 | Location: location, |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | // ErrorUnexpectedChar creates an error for an unexpected character. |
| 70 | // |
no outgoing calls