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()
This commit is contained in:
parent
8703c8067f
commit
b8bb2e118e
7 changed files with 99 additions and 118 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue