MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / parseVariableDeclaration

Function parseVariableDeclaration

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

Source from the content-addressed store, hash-verified

3232 }
3233
3234 function parseVariableDeclaration() {
3235 var init = null, id, node = new Node();
3236
3237 id = parsePattern();
3238
3239 // 12.2.1
3240 if (strict && isRestrictedWord(id.name)) {
3241 tolerateError(Messages.StrictVarName);
3242 }
3243
3244 if (match('=')) {
3245 lex();
3246 init = parseAssignmentExpression();
3247 } else if (id.type !== Syntax.Identifier) {
3248 expect('=');
3249 }
3250
3251 return node.finishVariableDeclarator(id, init);
3252 }
3253
3254 function parseVariableDeclarationList() {
3255 var list = [];

Callers 1

Calls 7

parsePatternFunction · 0.85
isRestrictedWordFunction · 0.85
tolerateErrorFunction · 0.85
matchFunction · 0.85
lexFunction · 0.85
expectFunction · 0.85

Tested by

no test coverage detected