MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / tryReadIdentifierPart

Method tryReadIdentifierPart

src/parser/scanner.ts:450–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

448 }
449
450 private tryReadIdentifierPart(): string | undefined {
451 if (this.stream.eof) {
452 return;
453 }
454 const matchedIdentifierStart = this.tryReadIdentifierStart();
455 if (matchedIdentifierStart !== undefined) {
456 return matchedIdentifierStart;
457 }
458 if (identifierPart.test(this.stream.char)) {
459 const value = this.stream.char;
460 this.stream.next();
461 return value;
462 }
463 return;
464 }
465
466 private readUnicodeEscapeSequence(): `u${string}` {
467 if (this.stream.eof || (this.stream.char as string) !== 'u') {

Callers 1

tryReadWordMethod · 0.95

Calls 2

nextMethod · 0.65

Tested by

no test coverage detected