Add a pretty-printer
Adds a -pp option to the compiler which will cause it to simply pretty-print the given file.
This commit is contained in:
committed by
Graydon Hoare
parent
8047957b99
commit
0624f9db4a
@@ -983,6 +983,7 @@ impure fn parse_prefix_expr(parser p) -> @ast.expr {
|
||||
|
||||
type op_spec = rec(token.token tok, ast.binop op, int prec);
|
||||
|
||||
// FIXME make this a const, don't store it in parser state
|
||||
fn prec_table() -> vec[op_spec] {
|
||||
ret vec(rec(tok=token.BINOP(token.STAR), op=ast.mul, prec=11),
|
||||
rec(tok=token.BINOP(token.SLASH), op=ast.div, prec=11),
|
||||
|
||||
Reference in New Issue
Block a user