Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
feat(cargo): Rustup
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Feb 18, 2016
1 parent 933032a commit 036915c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aster"
version = "0.12.0"
version = "0.13.0"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A libsyntax ast builder"
Expand All @@ -11,7 +11,7 @@ with-syntex = ["syntex_syntax"]
unstable-testing = ["clippy", "compiletest_rs"]

[dependencies]
syntex_syntax = { version = "^0.28.0", optional = true }
syntex_syntax = { version = "^0.29.0", optional = true }
clippy = { version = "^0.0.41", optional = true }
compiletest_rs = { version = "^0.0.11", optional = true }

Expand Down
18 changes: 9 additions & 9 deletions src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@ impl<F> PatBuilder<F>
self.callback.invoke(pat)
}

pub fn build_pat_(self, pat_: ast::Pat_) -> F::Result {
pub fn build_pat_kind(self, pat_kind: ast::PatKind) -> F::Result {
let span = self.span;
self.build(P(ast::Pat {
id: ast::DUMMY_NODE_ID,
node: pat_,
node: pat_kind,
span: span,
}))
}

pub fn wild(self) -> F::Result {
self.build_pat_(ast::Pat_::PatWild)
self.build_pat_kind(ast::PatKind::Wild)
}

pub fn build_id<I>(self, mode: ast::BindingMode, id: I, sub: Option<P<ast::Pat>>) -> F::Result
where I: ToIdent,
{
let id = respan(self.span, id.to_ident());

self.build_pat_(ast::Pat_::PatIdent(mode, id, sub))
self.build_pat_kind(ast::PatKind::Ident(mode, id, sub))
}

pub fn id<I>(self, id: I) -> F::Result
Expand Down Expand Up @@ -167,7 +167,7 @@ impl<F> PatEnumPathBuilder<F>
}

pub fn build(self) -> F::Result {
self.builder.build_pat_(ast::Pat_::PatEnum(self.path, Some(self.pats)))
self.builder.build_pat_kind(ast::PatKind::TupleStruct(self.path, Some(self.pats)))
}
}

Expand Down Expand Up @@ -272,11 +272,11 @@ impl<F> PatStructPathBuilder<F>
}

pub fn etc(self) -> F::Result {
self.builder.build_pat_(ast::Pat_::PatStruct(self.path, self.pats, true))
self.builder.build_pat_kind(ast::PatKind::Struct(self.path, self.pats, true))
}

pub fn build(self) -> F::Result {
self.builder.build_pat_(ast::Pat_::PatStruct(self.path, self.pats, false))
self.builder.build_pat_kind(ast::PatKind::Struct(self.path, self.pats, false))
}
}

Expand Down Expand Up @@ -311,7 +311,7 @@ impl<F> Invoke<P<ast::Expr>> for PatExprBuilder<F>
type Result = F::Result;

fn invoke(self, expr: P<ast::Expr>) -> F::Result {
self.0.build_pat_(ast::Pat_::PatLit(expr))
self.0.build_pat_kind(ast::PatKind::Lit(expr))
}
}

Expand Down Expand Up @@ -342,7 +342,7 @@ impl<F: Invoke<P<ast::Pat>>> PatTupleBuilder<F>
}

pub fn build(self) -> F::Result {
self.builder.build_pat_(ast::PatTup(self.pats))
self.builder.build_pat_kind(ast::PatKind::Tup(self.pats))
}
}

Expand Down

0 comments on commit 036915c

Please sign in to comment.