(firstRestricted)
| 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, |
no test coverage detected