aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorLindsey Kuper <[email protected]>2011-04-05 14:18:44 -0700
committerGraydon Hoare <[email protected]>2011-04-05 14:54:48 -0700
commitb8bb2e118e9815316320f946ef3fc7e6909ed7c9 (patch)
tree6b550692b0b086bde56c621f5ffd428e7dcc1b08 /src/comp/front/parser.rs
parentFIx native wrapper generation to handle more arg types. (diff)
downloadrust-b8bb2e118e9815316320f946ef3fc7e6909ed7c9.tar.xz
rust-b8bb2e118e9815316320f946ef3fc7e6909ed7c9.zip
Further on the path toward self-awareness.
Mostly: * Merciless refactoring of trans.rs so that trans_call can work for self-calls as well as other kinds of calls Also: * Various changes to go with having idents, rather than exprs, in expr_call_self AST nodes * Added missing case for SELF token to token.to_str()
Diffstat (limited to 'src/comp/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index 1e0a9042..31e470be 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -887,10 +887,12 @@ impure fn parse_bottom_expr(parser p) -> @ast.expr {
}
case (token.SELF) {
+ log "parsing a self-call...";
+
p.bump();
expect(p, token.DOT);
// The rest is a call expression.
- auto e = parse_bottom_expr(p);
+ auto e = parse_ident(p);
auto pf = parse_expr;
auto es = parse_seq[@ast.expr](token.LPAREN,
token.RPAREN,