MCPcopy Create free account
hub / github.com/Snapchat/Valdi / parseIdentifier

Method parseIdentifier

compiler/companion/src/utils/TextParser.ts:104–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 }
103
104 parseIdentifier(): string {
105 this.consumeWhitespaces();
106 let startPosition = this.position;
107 let endPosition = startPosition;
108
109 for (;;) {
110 if (this.isIdentifier(endPosition)) {
111 endPosition++;
112 } else {
113 break;
114 }
115 }
116
117 if (startPosition === endPosition) {
118 this.onError('Not an identifier');
119 }
120
121 this.position = endPosition;
122
123 return this.text.substring(startPosition, endPosition);
124 }
125
126 skipCurrentLine(): void {
127 while (!this.isAtEnd()) {

Callers 2

makeImportedSymbolFunction · 0.45
parseImportedSymbolFunction · 0.45

Calls 4

consumeWhitespacesMethod · 0.95
isIdentifierMethod · 0.95
onErrorMethod · 0.95
substringMethod · 0.80

Tested by

no test coverage detected