aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parser_api.rs
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2018-10-15 22:44:23 +0100
committerJeremy A. Kolb <[email protected]>2018-10-16 14:41:10 +0100
commit61f3a438d3a729a6be941bca1ff4c6a97a33f221 (patch)
tree6551967cc8c6e921b66071453ad7888a9121d326 /crates/ra_syntax/src/parser_api.rs
parent39cb6c6d3f78b193f5873c3492e530bbd24d5dd2 (diff)
Cargo Format
Run `cargo fmt` and ignore generated files
Diffstat (limited to 'crates/ra_syntax/src/parser_api.rs')
-rw-r--r--crates/ra_syntax/src/parser_api.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/parser_api.rs b/crates/ra_syntax/src/parser_api.rs
index cc23bb75e..42046d36f 100644
--- a/crates/ra_syntax/src/parser_api.rs
+++ b/crates/ra_syntax/src/parser_api.rs
@@ -1,8 +1,8 @@
1use crate::{ 1use crate::{
2 token_set::TokenSet, 2 drop_bomb::DropBomb,
3 parser_impl::ParserImpl, 3 parser_impl::ParserImpl,
4 token_set::TokenSet,
4 SyntaxKind::{self, ERROR}, 5 SyntaxKind::{self, ERROR},
5 drop_bomb::DropBomb,
6}; 6};
7 7
8/// `Parser` struct provides the low-level API for 8/// `Parser` struct provides the low-level API for
@@ -116,9 +116,7 @@ impl<'t> Parser<'t> {
116 116
117 /// Create an error node and consume the next token. 117 /// Create an error node and consume the next token.
118 pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) { 118 pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) {
119 if self.at(SyntaxKind::L_CURLY) 119 if self.at(SyntaxKind::L_CURLY) || self.at(SyntaxKind::R_CURLY) || self.at_ts(recovery) {
120 || self.at(SyntaxKind::R_CURLY)
121 || self.at_ts(recovery) {
122 self.error(message); 120 self.error(message);
123 } else { 121 } else {
124 let m = self.start(); 122 let m = self.start();