aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-28 12:23:40 -0700
committerGraydon Hoare <[email protected]>2010-09-28 12:23:40 -0700
commit11e72fd4e0a2e46afd9021b8ab4fb071ffb6ee89 (patch)
treea64cd52424d49ec52caf9548ecc2eb352097c030 /src/comp/front/parser.rs
parentMore rustc expr-parsing logic. (diff)
downloadrust-11e72fd4e0a2e46afd9021b8ab4fb071ffb6ee89.tar.xz
rust-11e72fd4e0a2e46afd9021b8ab4fb071ffb6ee89.zip
Translate literal int, char, bool and str types, as well as logging them.
Diffstat (limited to 'src/comp/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs4
1 files changed, 4 insertions, 0 deletions
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;