summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
-rw-r--r--src/comp/syntax/parse/parser.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index aa553e32e39..b4ad7339e25 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -173,7 +173,7 @@ fn bad_expr_word_table() -> hashmap<str, ()> {
     words.insert("fn", ());
     words.insert("block", ());
     words.insert("lambda", ());
-    words.insert("pred", ());
+    words.insert("pure", ());
     words.insert("iter", ());
     words.insert("block", ());
     words.insert("import", ());
@@ -326,8 +326,6 @@ fn parse_proto(p: &parser) -> ast::proto {
         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()); }
 }
 
@@ -2123,7 +2121,13 @@ fn parse_item(p: &parser, attrs: &[ast::attribute]) -> option::t<@ast::item> {
         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") {