Skip to content

Commit 5605ac5

Browse files
committed
---
yaml --- r: 6712 b: refs/heads/master c: f82d101 h: refs/heads/master v: v3
1 parent 86863fb commit 5605ac5

File tree

2 files changed

+9
-39
lines changed

2 files changed

+9
-39
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 2cd3d1ff5934f69b894e9c41b9d5898f0d249d3e
2+
refs/heads/master: f82d101511a0d35e2a7461003b6dd2f966ac7e92

trunk/src/comp/syntax/parse/parser.rs

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -151,40 +151,14 @@ fn new_parser(sess: parse_sess, cfg: ast::crate_cfg, rdr: lexer::reader,
151151
// interpreted as a specific kind of statement, which would be confusing.
152152
fn bad_expr_word_table() -> hashmap<str, ()> {
153153
let words = new_str_hash();
154-
words.insert("mod", ());
155-
words.insert("if", ());
156-
words.insert("else", ());
157-
words.insert("while", ());
158-
words.insert("do", ());
159-
words.insert("alt", ());
160-
words.insert("for", ());
161-
words.insert("break", ());
162-
words.insert("cont", ());
163-
words.insert("ret", ());
164-
words.insert("be", ());
165-
words.insert("fail", ());
166-
words.insert("type", ());
167-
words.insert("resource", ());
168-
words.insert("check", ());
169-
words.insert("assert", ());
170-
words.insert("claim", ());
171-
words.insert("native", ());
172-
words.insert("fn", ());
173-
words.insert("lambda", ());
174-
words.insert("pure", ());
175-
words.insert("unsafe", ());
176-
words.insert("block", ());
177-
words.insert("import", ());
178-
words.insert("export", ());
179-
words.insert("let", ());
180-
words.insert("const", ());
181-
words.insert("log", ());
182-
words.insert("log_err", ());
183-
words.insert("sendfn", ());
184-
words.insert("tag", ());
185-
words.insert("obj", ());
186-
words.insert("copy", ());
187-
ret words;
154+
for word in ["mod", "if", "else", "while", "do", "alt", "for", "break",
155+
"cont", "ret", "be", "fail", "type", "resource", "check",
156+
"assert", "claim", "native", "fn", "lambda", "pure",
157+
"unsafe", "block", "import", "export", "let", "const",
158+
"log", "log_err", "tag", "obj", "self", "copy", "sendfn"] {
159+
words.insert(word, ());
160+
}
161+
words
188162
}
189163

190164
fn unexpected(p: parser, t: token::token) -> ! {
@@ -828,10 +802,6 @@ fn parse_bottom_expr(p: parser) -> @ast::expr {
828802
ret parse_do_while_expr(p);
829803
} else if eat_word(p, "alt") {
830804
ret parse_alt_expr(p);
831-
/*
832-
} else if (eat_word(p, "spawn")) {
833-
ret parse_spawn_expr(p);
834-
*/
835805
} else if eat_word(p, "fn") {
836806
let proto = parse_fn_ty_proto(p);
837807
ret parse_fn_expr(p, proto);

0 commit comments

Comments
 (0)