MCPcopy Create free account
hub / github.com/microsoft/typescript-go / IsIdentifierPartEx

Function IsIdentifierPartEx

internal/scanner/scanner.go:2249–2253  ·  view source on GitHub ↗
(ch rune, languageVariant core.LanguageVariant)

Source from the content-addressed store, hash-verified

2247}
2248
2249func IsIdentifierPartEx(ch rune, languageVariant core.LanguageVariant) bool {
2250 return isWordCharacter(ch) || ch == '$' ||
2251 ch >= utf8.RuneSelf && stringutil.IsUnicodeIdentifierPart(ch) ||
2252 languageVariant == core.LanguageVariantJSX && (ch == '-' || ch == ':') // "-" and ":" are valid in JSX Identifiers
2253}
2254
2255var tokenToText = func() [ast.KindCount]string {
2256 var result [ast.KindCount]string

Callers 2

IsIdentifierPartFunction · 0.85
IsIdentifierTextFunction · 0.85

Calls 2

IsUnicodeIdentifierPartFunction · 0.92
isWordCharacterFunction · 0.85

Tested by

no test coverage detected