MCPcopy
hub / github.com/BloombergGraphics/whatiscode / parseVariableIdentifier

Function parseVariableIdentifier

scripts/libs/esprima.js:3218–3232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3216 // 12.2 Variable Statement
3217
3218 function parseVariableIdentifier() {
3219 var token, node = new Node();
3220
3221 token = lex();
3222
3223 if (token.type !== Token.Identifier) {
3224 if (strict && token.type === Token.Keyword && isStrictModeReservedWord(token.value)) {
3225 tolerateUnexpectedToken(token, Messages.StrictReservedWord);
3226 } else {
3227 throwUnexpectedToken(token);
3228 }
3229 }
3230
3231 return node.finishIdentifier(token.value);
3232 }
3233
3234 function parseVariableDeclaration() {
3235 var init = null, id, node = new Node();

Callers 10

parseArrayPatternFunction · 0.85
parsePropertyPatternFunction · 0.85
parsePatternFunction · 0.85
parseRestElementFunction · 0.85
parseContinueStatementFunction · 0.85
parseBreakStatementFunction · 0.85
parseFunctionDeclarationFunction · 0.85
parseFunctionExpressionFunction · 0.85
parseClassDeclarationFunction · 0.85
parseClassExpressionFunction · 0.85

Calls 4

lexFunction · 0.85
isStrictModeReservedWordFunction · 0.85
tolerateUnexpectedTokenFunction · 0.85
throwUnexpectedTokenFunction · 0.85

Tested by

no test coverage detected