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

Function parseParams

scripts/libs/esprima.js:4029–4064  ·  view source on GitHub ↗
(firstRestricted)

Source from the content-addressed store, hash-verified

4027 }
4028
4029 function parseParams(firstRestricted) {
4030 var options;
4031
4032 options = {
4033 params: [],
4034 defaultCount: 0,
4035 defaults: [],
4036 firstRestricted: firstRestricted
4037 };
4038
4039 expect('(');
4040
4041 if (!match(')')) {
4042 options.paramSet = {};
4043 while (startIndex < length) {
4044 if (!parseParam(options)) {
4045 break;
4046 }
4047 expect(',');
4048 }
4049 }
4050
4051 expect(')');
4052
4053 if (options.defaultCount === 0) {
4054 options.defaults = [];
4055 }
4056
4057 return {
4058 params: options.params,
4059 defaults: options.defaults,
4060 stricted: options.stricted,
4061 firstRestricted: options.firstRestricted,
4062 message: options.message
4063 };
4064 }
4065
4066 function parseFunctionDeclaration(node) {
4067 var id, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict;

Callers 3

parseFunctionDeclarationFunction · 0.85
parseFunctionExpressionFunction · 0.85

Calls 3

expectFunction · 0.85
matchFunction · 0.85
parseParamFunction · 0.85

Tested by

no test coverage detected