diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-03-09 16:54:34 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-03-17 09:53:07 +0200 |
| commit | 90cbe0cad20d2736c7e7ebbffb2c2d84016f9340 (patch) | |
| tree | a0bee02f6e23b5b27a4606fbed7b32cd631b3e58 /src/libsyntax/parse/parser.rs | |
| parent | 555a239301cabeb20e45c9c3c3cf98588b8ec916 (diff) | |
| download | rust-90cbe0cad20d2736c7e7ebbffb2c2d84016f9340.tar.gz rust-90cbe0cad20d2736c7e7ebbffb2c2d84016f9340.zip | |
De-@ ParseSess uses.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f52effb8c81..d183eb44cc2 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -284,8 +284,8 @@ struct ParsedItemsAndViewItems { /* ident is handled by common.rs */ -pub fn Parser(sess: @ParseSess, cfg: ast::CrateConfig, rdr: ~Reader:) - -> Parser { +pub fn Parser<'a>(sess: &'a ParseSess, cfg: ast::CrateConfig, rdr: ~Reader:) + -> Parser<'a> { let tok0 = rdr.next_token(); let span = tok0.sp; let placeholder = TokenAndSpan { @@ -320,8 +320,8 @@ pub fn Parser(sess: @ParseSess, cfg: ast::CrateConfig, rdr: ~Reader:) } } -pub struct Parser { - sess: @ParseSess, +pub struct Parser<'a> { + sess: &'a ParseSess, cfg: CrateConfig, // the current token: token: token::Token, @@ -354,7 +354,7 @@ fn is_plain_ident_or_underscore(t: &token::Token) -> bool { is_plain_ident(t) || *t == token::UNDERSCORE } -impl Parser { +impl<'a> Parser<'a> { // convert a token to a string using self's reader pub fn token_to_str(token: &token::Token) -> ~str { token::to_str(token) |
