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

Function parseRestElement

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

Source from the content-addressed store, hash-verified

3328 }
3329
3330 function parseRestElement() {
3331 var param, node = new Node();
3332
3333 lex();
3334
3335 if (match('{')) {
3336 throwError(Messages.ObjectPatternAsRestParameter);
3337 }
3338
3339 param = parseVariableIdentifier();
3340
3341 if (match('=')) {
3342 throwError(Messages.DefaultRestParameter);
3343 }
3344
3345 if (!match(')')) {
3346 throwError(Messages.ParameterAfterRestParameter);
3347 }
3348
3349 return node.finishRestElement(param);
3350 }
3351
3352 // 12.3 Empty Statement
3353

Callers 2

parseGroupExpressionFunction · 0.85
parseParamFunction · 0.85

Calls 4

lexFunction · 0.85
matchFunction · 0.85
throwErrorFunction · 0.85
parseVariableIdentifierFunction · 0.85

Tested by

no test coverage detected