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

Function isUnicodeIdentifierPart

pkg/sql/tokenizer/unicode.go:59–65  ·  view source on GitHub ↗

isUnicodeIdentifierPart checks if a rune can be part of a Unicode identifier. After the initial character, identifiers can contain: - Any Unicode letter (Lu, Ll, Lt, Lm, Lo) - Any Unicode digit (Nd category) - Underscore (_) - Non-spacing marks (Mn category) - diacritics, accents - Spacing combinin

(r rune)

Source from the content-addressed store, hash-verified

57//
58// Returns true if the rune can be part of an identifier, false otherwise.
59func isUnicodeIdentifierPart(r rune) bool {
60 return unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' ||
61 unicode.Is(unicode.Mn, r) || // Non-spacing marks
62 unicode.Is(unicode.Mc, r) || // Spacing combining marks
63 unicode.Is(unicode.Nd, r) || // Decimal numbers
64 unicode.Is(unicode.Pc, r) // Connector punctuation
65}
66
67// isUnicodeQuote checks if a rune is a Unicode quote character for identifiers.
68//

Callers 1

isIdentifierCharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected