Parse and reserve typeof keyword. #3228

This commit is contained in:
Ben Blum
2013-08-22 17:00:02 -04:00
parent 2c0f9bd354
commit e9f6f3f2cc
10 changed files with 43 additions and 4 deletions

View File

@@ -437,6 +437,11 @@ pub fn print_type(s: @ps, ty: &ast::Ty) {
print_expr(s, v);
word(s.s, "]");
}
ast::ty_typeof(e) => {
word(s.s, "typeof(");
print_expr(s, e);
word(s.s, ")");
}
ast::ty_mac(_) => {
fail!("print_type doesn't know how to print a ty_mac");
}