| 276 | } |
| 277 | |
| 278 | function maybeoperator(type, value) { |
| 279 | if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); |
| 280 | if (type == "operator" && value == "?") return cont(expression, expect(":"), expression); |
| 281 | if (type == ";") return; |
| 282 | if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); |
| 283 | if (type == ".") return cont(property, maybeoperator); |
| 284 | if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); |
| 285 | } |
| 286 | function maybelabel(type) { |
| 287 | if (type == ":") return cont(poplex, statement); |
| 288 | return pass(maybeoperator, expect(";"), poplex); |