()
| 5884 | // 11.2 Left-Hand-Side Expressions |
| 5885 | |
| 5886 | function parseArguments() { |
| 5887 | var args = [], arg; |
| 5888 | |
| 5889 | expect('('); |
| 5890 | |
| 5891 | if (!match(')')) { |
| 5892 | while (index < length) { |
| 5893 | arg = parseSpreadOrAssignmentExpression(); |
| 5894 | args.push(arg); |
| 5895 | |
| 5896 | if (match(')')) { |
| 5897 | break; |
| 5898 | } else if (arg.type === Syntax.SpreadElement) { |
| 5899 | throwError({}, Messages.ElementAfterSpreadElement); |
| 5900 | } |
| 5901 | |
| 5902 | expect(','); |
| 5903 | } |
| 5904 | } |
| 5905 | |
| 5906 | expect(')'); |
| 5907 | |
| 5908 | return args; |
| 5909 | } |
| 5910 | |
| 5911 | function parseSpreadOrAssignmentExpression() { |
| 5912 | if (match('...')) { |
no test coverage detected