Implement Macro By Example.

This commit is contained in:
Paul Stansifer 2011-07-21 16:47:47 -07:00
parent 4a6ccf3b0f
commit e18d70fe12
7 changed files with 667 additions and 235 deletions

View file

@ -807,6 +807,9 @@ fn parse_bottom_expr(&parser p) -> @ast::expr {
p.bump();
auto blk = ast::mac_embed_block(parse_block_tail(p));
ret mk_mac_expr(p, lo, p.get_hi_pos(), blk);
} else if (p.peek() == token::ELLIPSIS) {
p.bump();
ret mk_mac_expr(p, lo, p.get_hi_pos(), ast::mac_ellipsis)
} else if (p.peek() == token::TILDE) {
p.bump();
alt (p.peek()) {