diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 3588c61c824..957c9206c90 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -346,6 +346,8 @@ tag ty_ { ty_obj(vec[ty_method]); ty_path(path, ann); ty_type; + ty_ivec(@ty); // interior vector + ty_istr; // interior string ty_constr(@ty, vec[@constr]); } diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index b8ec6a8a749..29c356655af 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -485,6 +485,7 @@ fn parse_ty(&parser p) -> @ast::ty { else if (eat_word(p, "uint")) { t = ast::ty_uint; } else if (eat_word(p, "float")) { t = ast::ty_float; } else if (eat_word(p, "str")) { t = ast::ty_str; } + else if (eat_word(p, "istr")) { t = ast::ty_istr; } else if (eat_word(p, "char")) { t = ast::ty_char; } else if (eat_word(p, "task")) { t = ast::ty_task; } else if (eat_word(p, "i8")) { t = ast::ty_machine(common::ty_i8); } @@ -570,6 +571,11 @@ fn parse_ty(&parser p) -> @ast::ty { t = ast::ty_chan(parse_ty(p)); hi = p.get_hi_pos(); expect(p, token::RBRACKET); + } else if (eat_word(p, "ivec")) { + expect(p, token::LBRACKET); + t = ast::ty_ivec(parse_ty(p)); + hi = p.get_hi_pos(); + expect(p, token::RBRACKET); } else if (eat_word(p, "mutable")) { p.get_session().span_warn(p.get_span(), "ignoring deprecated 'mutable' type constructor");