diff options
Diffstat (limited to 'src/libsyntax/parse/lexer/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 96584a580f1..b7e8a880e7e 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -66,6 +66,10 @@ pub struct StringReader<'a> { /// The raw source span which *does not* take `override_span` into account span_src_raw: Span, open_braces: Vec<(token::DelimToken, Span)>, + /// The type and spans for all braces that have different indentation. + /// + /// Used only for error recovery when arriving to EOF with mismatched braces. + suspicious_open_spans: Vec<(token::DelimToken, Span, Span)>, crate override_span: Option<Span>, last_unclosed_found_span: Option<Span>, } @@ -216,6 +220,7 @@ impl<'a> StringReader<'a> { span: syntax_pos::DUMMY_SP, span_src_raw: syntax_pos::DUMMY_SP, open_braces: Vec::new(), + suspicious_open_spans: Vec::new(), override_span, last_unclosed_found_span: None, } |
