Translate literal int, char, bool and str types, as well as logging them.

This commit is contained in:
Graydon Hoare 2010-09-28 12:23:40 -07:00
parent fbea4d04b7
commit 11e72fd4e0
2 changed files with 95 additions and 20 deletions

View file

@ -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;