MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / ErrorUnexpectedChar

Function ErrorUnexpectedChar

pkg/sql/tokenizer/error.go:81–83  ·  view source on GitHub ↗

ErrorUnexpectedChar creates an error for an unexpected character. This is used when the tokenizer encounters a character that cannot start any valid token in the current context. Parameters: - ch: The unexpected character (byte) - location: Position where the character was found Returns an Error

(ch byte, location models.Location)

Source from the content-addressed store, hash-verified

79//
80// Example: "unexpected character: @ at line 2, column 5"
81func ErrorUnexpectedChar(ch byte, location models.Location) *Error {
82 return NewError(fmt.Sprintf("unexpected character: %c", ch), location)
83}
84
85// ErrorUnterminatedString creates an error for an unterminated string literal.
86//

Callers 1

TestTokenizerErrorFunction · 0.85

Calls 1

NewErrorFunction · 0.70

Tested by 1

TestTokenizerErrorFunction · 0.68