words.insert("fn", ());
words.insert("block", ());
words.insert("lambda", ());
- words.insert("pred", ()); // FIXME: remove
words.insert("pure", ());
words.insert("iter", ());
words.insert("block", ());
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") {
ret some(parse_item_fn_or_iter(p, ast::impure_fn, ast::proto_iter,
attrs, ast::il_normal));
fn alloc(n_bytes: uint) -> str { ret rustrt::str_alloc(n_bytes); }
/// Returns true if the string has length 0
-pred is_empty(s: str) -> bool { for c: u8 in s { ret false; } ret true; }
+pure fn is_empty(s: str) -> bool { for c: u8 in s { ret false; } ret true; }
/// Returns true if the string has length greater than 0
-pred is_not_empty(s: str) -> bool { !is_empty(s) }
+pure fn is_not_empty(s: str) -> bool { !is_empty(s) }
fn is_whitespace(s: str) -> bool {
let i = 0u;