(opts)
| 3324 | } |
| 3325 | |
| 3326 | function comma(opts) { |
| 3327 | opts = opts || {}; |
| 3328 | |
| 3329 | if (!opts.peek) { |
| 3330 | nobreakcomma(state.tokens.curr, state.tokens.next); |
| 3331 | advance(","); |
| 3332 | } else { |
| 3333 | nobreakcomma(state.tokens.prev, state.tokens.curr); |
| 3334 | } |
| 3335 | |
| 3336 | if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) { |
| 3337 | switch (state.tokens.next.value) { |
| 3338 | case "break": |
| 3339 | case "case": |
| 3340 | case "catch": |
| 3341 | case "continue": |
| 3342 | case "default": |
| 3343 | case "do": |
| 3344 | case "else": |
| 3345 | case "finally": |
| 3346 | case "for": |
| 3347 | case "if": |
| 3348 | case "in": |
| 3349 | case "instanceof": |
| 3350 | case "return": |
| 3351 | case "switch": |
| 3352 | case "throw": |
| 3353 | case "try": |
| 3354 | case "var": |
| 3355 | case "let": |
| 3356 | case "while": |
| 3357 | case "with": |
| 3358 | error("E024", state.tokens.next, state.tokens.next.value); |
| 3359 | return false; |
| 3360 | } |
| 3361 | } |
| 3362 | |
| 3363 | if (state.tokens.next.type === "(punctuator)") { |
| 3364 | switch (state.tokens.next.value) { |
| 3365 | case "}": |
| 3366 | case "]": |
| 3367 | case ",": |
| 3368 | if (opts.allowTrailing) { |
| 3369 | return true; |
| 3370 | } |
| 3371 | case ")": |
| 3372 | error("E024", state.tokens.next, state.tokens.next.value); |
| 3373 | return false; |
| 3374 | } |
| 3375 | } |
| 3376 | return true; |
| 3377 | } |
| 3378 | |
| 3379 | function symbol(s, p) { |
| 3380 | var x = state.syntax[s]; |
no test coverage detected