1
Fork 0

Register new snapshots

This commit is contained in:
Alex Crichton 2013-09-16 23:34:40 -07:00
parent e02313a172
commit 817576ee70
32 changed files with 32 additions and 1663 deletions

View file

@ -644,25 +644,11 @@ impl AstBuilder for @ExtCtxt {
self.expr(span, ast::ExprFnBlock(fn_decl, blk))
}
#[cfg(stage0)]
fn lambda0(&self, _span: Span, blk: ast::Block) -> @ast::Expr {
let ext_cx = *self;
let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone()));
quote_expr!(|| $blk_e )
}
#[cfg(not(stage0))]
fn lambda0(&self, _span: Span, blk: ast::Block) -> @ast::Expr {
let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone()));
quote_expr!(*self, || $blk_e )
}
#[cfg(stage0)]
fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::Expr {
let ext_cx = *self;
let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone()));
quote_expr!(|$ident| $blk_e )
}
#[cfg(not(stage0))]
fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::Expr {
let blk_e = self.expr(blk.span, ast::ExprBlock(blk.clone()));
quote_expr!(*self, |$ident| $blk_e )