From e35c021aa44d9e86569592657f85943bae1815a5 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 1 Sep 2011 16:47:46 -0700 Subject: Parse "",str as istrs. Pretty print istrs as "",str. Issue #855 --- src/comp/syntax/parse/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp/syntax/parse') diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index cf3c02cb03a..e22ebeb78d3 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -493,7 +493,7 @@ fn parse_ty(p: &parser, colons_before_params: bool) -> @ast::ty { } else if eat_word(p, ~"float") { t = ast::ty_float; } else if eat_word(p, ~"str") { - t = ast::ty_str; + t = ast::ty_istr; } else if eat_word(p, ~"istr") { t = ast::ty_istr; } else if eat_word(p, ~"char") { @@ -708,7 +708,7 @@ fn parse_lit(p: &parser) -> ast::lit { token::LIT_CHAR(c) { p.bump(); lit = ast::lit_char(c); } token::LIT_STR(s) { p.bump(); - lit = ast::lit_str(p.get_str(s), ast::sk_rc); + lit = ast::lit_str(p.get_str(s), ast::sk_unique); } token::LPAREN. { p.bump(); -- cgit 1.4.1-3-g733a5