diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2016-10-19 23:33:41 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2016-10-20 20:28:10 +0300 |
| commit | 65ff4ca2948301f59b6a6eab14234d005378859a (patch) | |
| tree | dec389c4b15fef80128024302f868d4176ff9d84 /src/libsyntax/parse/lexer | |
| parent | 7bccb829d0fe9a733bd6efcf6f7313186ae237ab (diff) | |
| download | rust-65ff4ca2948301f59b6a6eab14234d005378859a.tar.gz rust-65ff4ca2948301f59b6a6eab14234d005378859a.zip | |
Refactor parser lookahead buffer and increase its size
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index e62d0d925cd..5e20f6e4192 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -74,6 +74,12 @@ pub struct TokenAndSpan { pub sp: Span, } +impl Default for TokenAndSpan { + fn default() -> Self { + TokenAndSpan { tok: token::Underscore, sp: syntax_pos::DUMMY_SP } + } +} + pub struct StringReader<'a> { pub span_diagnostic: &'a Handler, /// The absolute offset within the codemap of the next character to read |
