diff options
Diffstat (limited to 'src/parser/event.rs')
-rw-r--r-- | src/parser/event.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parser/event.rs b/src/parser/event.rs index e97350c89..90348398e 100644 --- a/src/parser/event.rs +++ b/src/parser/event.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use {File, FileBuilder, Sink, SyntaxKind, TextUnit, Token}; | 1 | use {ErrorMsg, File, FileBuilder, Sink, SyntaxKind, TextUnit, Token}; |
2 | use syntax_kinds::TOMBSTONE; | 2 | use syntax_kinds::TOMBSTONE; |
3 | use super::is_insignificant; | 3 | use super::is_insignificant; |
4 | 4 | ||
@@ -140,7 +140,9 @@ pub(super) fn to_file(text: String, tokens: &[Token], events: Vec<Event>) -> Fil | |||
140 | } | 140 | } |
141 | builder.leaf(kind, len); | 141 | builder.leaf(kind, len); |
142 | } | 142 | } |
143 | &Event::Error { ref message } => builder.error().message(message.clone()).emit(), | 143 | &Event::Error { ref message } => builder.error(ErrorMsg { |
144 | message: message.clone(), | ||
145 | }), | ||
144 | } | 146 | } |
145 | } | 147 | } |
146 | builder.finish() | 148 | builder.finish() |