| 173 | return cont(pushlex("stat", tag), comb, poplex, block); |
| 174 | } |
| 175 | function block(type) { |
| 176 | if (type == "}") return cont(); |
| 177 | if (type == "let") return stat_of(letdef1, "let"); |
| 178 | if (type == "fn") return stat_of(fndef); |
| 179 | if (type == "type") return cont(pushlex("stat"), tydef, endstatement, poplex, block); |
| 180 | if (type == "enum") return stat_of(enumdef); |
| 181 | if (type == "mod") return stat_of(mod); |
| 182 | if (type == "iface") return stat_of(iface); |
| 183 | if (type == "impl") return stat_of(impl); |
| 184 | if (type == "open-attr") return cont(pushlex("]"), commasep(expression, "]"), poplex); |
| 185 | if (type == "ignore" || type.match(/[\]\);,]/)) return cont(block); |
| 186 | return pass(pushlex("stat"), expression, poplex, endstatement, block); |
| 187 | } |
| 188 | function endstatement(type) { |
| 189 | if (type == ";") return cont(); |
| 190 | return pass(); |