words.insert("fn", ());
words.insert("block", ());
words.insert("lambda", ());
- words.insert("pred", ());
+ words.insert("pure", ());
words.insert("iter", ());
words.insert("block", ());
words.insert("import", ());
ret ast::proto_fn;
} else if eat_word(p, "block") {
ret ast::proto_block;
- } else if eat_word(p, "pred") {
- ret ast::proto_fn;
} else { unexpected(p, p.peek()); }
}
p.bump();
ret some(parse_item_fn_or_iter(p, ast::impure_fn, ast::proto_fn,
attrs, ast::il_normal));
- } else if eat_word(p, "pred") {
+ } else if eat_word(p, "pure") {
+ expect_word(p, "fn");
+ ret some(parse_item_fn_or_iter(p, ast::pure_fn, ast::proto_fn, attrs,
+ ast::il_normal));
+ }
+ // FIXME: remove
+ else if eat_word(p, "pred") {
ret some(parse_item_fn_or_iter(p, ast::pure_fn, ast::proto_fn, attrs,
ast::il_normal));
} else if eat_word(p, "iter") {
typarams: &[ast::ty_param], constrs: [@ast::constr]) {
alt decl.purity {
ast::impure_fn. { head(s, proto_to_str(proto)); }
- _ { head(s, "pred"); }
+ _ { head(s, "pure fn"); }
}
word(s.s, name);
print_type_params(s, typarams);