| 681 | if (type == "{") return contCommasep(proppattern, "}"); |
| 682 | } |
| 683 | function proppattern(type, value) { |
| 684 | if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { |
| 685 | register(value); |
| 686 | return cont(maybeAssign); |
| 687 | } |
| 688 | if (type == "variable") cx.marked = "property"; |
| 689 | if (type == "spread") return cont(pattern); |
| 690 | if (type == "}") return pass(); |
| 691 | if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern); |
| 692 | return cont(expect(":"), pattern, maybeAssign); |
| 693 | } |
| 694 | function eltpattern() { |
| 695 | return pass(pattern, maybeAssign) |
| 696 | } |