diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2015-05-02 10:55:41 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2015-05-15 08:01:55 -0700 |
| commit | 7b00658413db724525db72364b7f77b65ef6af1d (patch) | |
| tree | 193d68d3d1531bf40c92b0ddb70083544ad6d966 /src/libsyntax/parse/parser.rs | |
| parent | eef6b4a37b9b7a1753bb91016c36435ad66309dc (diff) | |
| download | rust-7b00658413db724525db72364b7f77b65ef6af1d.tar.gz rust-7b00658413db724525db72364b7f77b65ef6af1d.zip | |
syntax: Add unquoting ast::{Generics,WhereClause}
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 541ec16b415..9bf6fa88ba5 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3808,6 +3808,8 @@ impl<'a> Parser<'a> { /// | ( < lifetimes , typaramseq ( , )? > ) /// where typaramseq = ( typaram ) | ( typaram , typaramseq ) pub fn parse_generics(&mut self) -> PResult<ast::Generics> { + maybe_whole!(self, NtGenerics); + if try!(self.eat(&token::Lt) ){ let lifetime_defs = try!(self.parse_lifetime_defs()); let mut seen_default = false; @@ -3928,6 +3930,8 @@ impl<'a> Parser<'a> { /// where T : Trait<U, V> + 'b, 'a : 'b /// ``` pub fn parse_where_clause(&mut self) -> PResult<ast::WhereClause> { + maybe_whole!(self, NtWhereClause); + let mut where_clause = WhereClause { id: ast::DUMMY_NODE_ID, predicates: Vec::new(), |
