MCPcopy Index your code
hub / github.com/reactjs/react-rails / parseParams

Function parseParams

lib/assets/javascripts/JSXTransformer.js:8152–8186  ·  view source on GitHub ↗
(firstRestricted)

Source from the content-addressed store, hash-verified

8150 }
8151
8152 function parseParams(firstRestricted) {
8153 var options, marker = markerCreate();
8154
8155 options = {
8156 params: [],
8157 defaultCount: 0,
8158 defaults: [],
8159 rest: null,
8160 firstRestricted: firstRestricted
8161 };
8162
8163 expect('(');
8164
8165 if (!match(')')) {
8166 options.paramSet = new StringMap();
8167 while (index < length) {
8168 if (!parseParam(options)) {
8169 break;
8170 }
8171 expect(',');
8172 }
8173 }
8174
8175 expect(')');
8176
8177 if (options.defaultCount === 0) {
8178 options.defaults = [];
8179 }
8180
8181 if (match(':')) {
8182 options.returnType = parseTypeAnnotation();
8183 }
8184
8185 return markerApply(marker, options);
8186 }
8187
8188 function parseFunctionDeclaration() {
8189 var id, body, token, tmp, firstRestricted, message, generator, isAsync,

Callers 4

parseFunctionDeclarationFunction · 0.85
parseFunctionExpressionFunction · 0.85

Calls 6

markerCreateFunction · 0.85
expectFunction · 0.85
matchFunction · 0.85
parseParamFunction · 0.85
parseTypeAnnotationFunction · 0.85
markerApplyFunction · 0.85

Tested by

no test coverage detected