MCPcopy Index your code
hub / github.com/json5/json5 / identifierNameEscape

Function identifierNameEscape

lib/parse.js:359–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357 },
358
359 identifierNameEscape () {
360 if (c !== 'u') {
361 throw invalidChar(read())
362 }
363
364 read()
365 const u = unicodeEscape()
366 switch (u) {
367 case '$':
368 case '_':
369 case '\u200C':
370 case '\u200D':
371 break
372
373 default:
374 if (!util.isIdContinueChar(u)) {
375 throw invalidIdentifier()
376 }
377
378 break
379 }
380
381 buffer += u
382 lexState = 'identifierName'
383 },
384
385 sign () {
386 switch (c) {

Callers

nothing calls this directly

Calls 4

invalidCharFunction · 0.85
readFunction · 0.85
unicodeEscapeFunction · 0.85
invalidIdentifierFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…