@@ -151,40 +151,14 @@ fn new_parser(sess: parse_sess, cfg: ast::crate_cfg, rdr: lexer::reader,
151
151
// interpreted as a specific kind of statement, which would be confusing.
152
152
fn bad_expr_word_table ( ) -> hashmap < str , ( ) > {
153
153
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
188
162
}
189
163
190
164
fn unexpected ( p : parser , t : token:: token ) -> ! {
@@ -828,10 +802,6 @@ fn parse_bottom_expr(p: parser) -> @ast::expr {
828
802
ret parse_do_while_expr ( p) ;
829
803
} else if eat_word ( p, "alt" ) {
830
804
ret parse_alt_expr ( p) ;
831
- /*
832
- } else if (eat_word(p, "spawn")) {
833
- ret parse_spawn_expr(p);
834
- */
835
805
} else if eat_word ( p, "fn" ) {
836
806
let proto = parse_fn_ty_proto ( p) ;
837
807
ret parse_fn_expr ( p, proto) ;
0 commit comments