diff options
| author | Graydon Hoare <[email protected]> | 2010-09-28 12:23:40 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-09-28 12:23:40 -0700 |
| commit | 11e72fd4e0a2e46afd9021b8ab4fb071ffb6ee89 (patch) | |
| tree | a64cd52424d49ec52caf9548ecc2eb352097c030 /src/comp/front | |
| parent | More rustc expr-parsing logic. (diff) | |
| download | rust-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')
| -rw-r--r-- | src/comp/front/parser.rs | 4 |
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; |