From 11e72fd4e0a2e46afd9021b8ab4fb071ffb6ee89 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 28 Sep 2010 12:23:40 -0700 Subject: Translate literal int, char, bool and str types, as well as logging them. --- src/comp/front/parser.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/comp/front/parser.rs') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index ea983968..9596f714 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -150,6 +150,10 @@ state fn parse_lit(parser p) -> @ast.lit { p.bump(); ret @ast.lit_bool(b); } + case (token.LIT_STR(?s)) { + p.bump(); + ret @ast.lit_str(s); + } } p.err("expected literal"); fail; -- cgit v1.2.3