diff options
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index e852fdcb0af..b671e9eaa69 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2172,17 +2172,9 @@ fn parse_meta_item(&parser p) -> @ast::meta_item { alt (p.peek()) { case (token::EQ) { p.bump(); - alt (p.peek()) { - case (token::LIT_STR(?s)) { - p.bump(); - auto value = p.get_str(s); - auto hi = p.get_hi_pos(); - ret @spanned(lo, hi, ast::meta_name_value(ident, value)); - } - case (_) { - p.fatal("Metadata items must be string literals"); - } - } + auto lit = parse_lit(p); + auto hi = p.get_hi_pos(); + ret @spanned(lo, hi, ast::meta_name_value(ident, lit)); } case (token::LPAREN) { auto inner_items = parse_meta_seq(p); |
