diff options
author | Aleksey Kladov <[email protected]> | 2019-02-20 13:16:14 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-20 13:16:14 +0000 |
commit | a4a1e08ab81193112a2e14413d084916241c3fca (patch) | |
tree | cef2c72994495e37b4e34cb7f7ff5a9b93765cd3 /crates | |
parent | 9f6883fbf10567e4177dbe77857c970b6dc61f48 (diff) |
flatten modules
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/builder.rs | 5 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/parser_impl.rs | 15 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/parser_impl/event.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_error.rs (renamed from crates/ra_syntax/src/syntax_node/syntax_error.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_node.rs | 11 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_text.rs (renamed from crates/ra_syntax/src/syntax_node/syntax_text.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/block.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/byte.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/byte_string.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/char.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/string.rs | 6 |
15 files changed, 37 insertions, 40 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index 755ccd8e0..edd5b4a28 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -26,12 +26,16 @@ pub mod utils; | |||
26 | mod validation; | 26 | mod validation; |
27 | mod syntax_node; | 27 | mod syntax_node; |
28 | mod ptr; | 28 | mod ptr; |
29 | mod syntax_error; | ||
30 | mod syntax_text; | ||
29 | 31 | ||
30 | pub use rowan::{SmolStr, TextRange, TextUnit}; | 32 | pub use rowan::{SmolStr, TextRange, TextUnit}; |
31 | pub use crate::{ | 33 | pub use crate::{ |
32 | ast::AstNode, | 34 | ast::AstNode, |
33 | syntax_kinds::SyntaxKind, | 35 | syntax_kinds::SyntaxKind, |
34 | syntax_node::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc}, | 36 | syntax_error::{SyntaxError, SyntaxErrorKind, Location}, |
37 | syntax_text::SyntaxText, | ||
38 | syntax_node::{Direction, SyntaxNode, WalkEvent, TreeArc}, | ||
35 | ptr::{SyntaxNodePtr, AstPtr}, | 39 | ptr::{SyntaxNodePtr, AstPtr}, |
36 | parsing::{tokenize, Token}, | 40 | parsing::{tokenize, Token}, |
37 | }; | 41 | }; |
diff --git a/crates/ra_syntax/src/parsing.rs b/crates/ra_syntax/src/parsing.rs index 2c92d554e..023e1031c 100644 --- a/crates/ra_syntax/src/parsing.rs +++ b/crates/ra_syntax/src/parsing.rs | |||
@@ -8,8 +8,9 @@ mod reparsing; | |||
8 | mod grammar; | 8 | mod grammar; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | SyntaxError, | ||
11 | parsing::builder::GreenBuilder, | 12 | parsing::builder::GreenBuilder, |
12 | syntax_node::{GreenNode, SyntaxError}, | 13 | syntax_node::GreenNode, |
13 | }; | 14 | }; |
14 | 15 | ||
15 | pub use self::lexer::{tokenize, Token}; | 16 | pub use self::lexer::{tokenize, Token}; |
diff --git a/crates/ra_syntax/src/parsing/builder.rs b/crates/ra_syntax/src/parsing/builder.rs index 9d7ad06fe..9090c60c2 100644 --- a/crates/ra_syntax/src/parsing/builder.rs +++ b/crates/ra_syntax/src/parsing/builder.rs | |||
@@ -1,8 +1,9 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | parsing::parser_impl::Sink, | 2 | parsing::parser_impl::Sink, |
3 | syntax_node::{GreenNode, RaTypes, SyntaxError}, | 3 | syntax_node::{GreenNode, RaTypes}, |
4 | SmolStr, SyntaxKind, | 4 | SmolStr, SyntaxKind, SyntaxError, |
5 | }; | 5 | }; |
6 | |||
6 | use rowan::GreenNodeBuilder; | 7 | use rowan::GreenNodeBuilder; |
7 | 8 | ||
8 | pub(crate) struct GreenBuilder { | 9 | pub(crate) struct GreenBuilder { |
diff --git a/crates/ra_syntax/src/parsing/parser_impl.rs b/crates/ra_syntax/src/parsing/parser_impl.rs index b710e9d5d..8cce1ab01 100644 --- a/crates/ra_syntax/src/parsing/parser_impl.rs +++ b/crates/ra_syntax/src/parsing/parser_impl.rs | |||
@@ -5,15 +5,16 @@ use std::cell::Cell; | |||
5 | 5 | ||
6 | use crate::{ | 6 | use crate::{ |
7 | SmolStr, | 7 | SmolStr, |
8 | syntax_node::syntax_error::{ParseError, SyntaxError}, | 8 | syntax_error::{ParseError, SyntaxError}, |
9 | parsing::{ | 9 | parsing::{ |
10 | lexer::Token, | 10 | lexer::Token, |
11 | parser_api::Parser, | 11 | parser_api::Parser, |
12 | parser_impl::{ | 12 | parser_impl::{ |
13 | event::{Event, EventProcessor}, | 13 | event::{Event, EventProcessor}, |
14 | input::{InputPosition, ParserInput}, | 14 | input::{InputPosition, ParserInput}, |
15 | }, | ||
15 | }, | 16 | }, |
16 | }}; | 17 | }; |
17 | 18 | ||
18 | use crate::SyntaxKind::{self, EOF, TOMBSTONE}; | 19 | use crate::SyntaxKind::{self, EOF, TOMBSTONE}; |
19 | 20 | ||
diff --git a/crates/ra_syntax/src/parsing/parser_impl/event.rs b/crates/ra_syntax/src/parsing/parser_impl/event.rs index fb43e19cc..2ddbdd34d 100644 --- a/crates/ra_syntax/src/parsing/parser_impl/event.rs +++ b/crates/ra_syntax/src/parsing/parser_impl/event.rs | |||
@@ -13,7 +13,7 @@ use crate::{ | |||
13 | SmolStr, | 13 | SmolStr, |
14 | SyntaxKind::{self, *}, | 14 | SyntaxKind::{self, *}, |
15 | TextRange, TextUnit, | 15 | TextRange, TextUnit, |
16 | syntax_node::syntax_error::{ | 16 | syntax_error::{ |
17 | ParseError, | 17 | ParseError, |
18 | SyntaxError, | 18 | SyntaxError, |
19 | SyntaxErrorKind, | 19 | SyntaxErrorKind, |
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index 0a24dae0e..a88f53dae 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -1,7 +1,8 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | SyntaxKind::*, TextRange, TextUnit, | 2 | SyntaxKind::*, TextRange, TextUnit, |
3 | algo, | 3 | algo, |
4 | syntax_node::{GreenNode, SyntaxError, SyntaxNode}, | 4 | syntax_node::{GreenNode, SyntaxNode}, |
5 | syntax_error::SyntaxError, | ||
5 | parsing::{ | 6 | parsing::{ |
6 | grammar, | 7 | grammar, |
7 | parser_impl, | 8 | parser_impl, |
diff --git a/crates/ra_syntax/src/syntax_node/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 4ff998090..4ff998090 100644 --- a/crates/ra_syntax/src/syntax_node/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs | |||
diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs index a0d7c32ec..aa627398d 100644 --- a/crates/ra_syntax/src/syntax_node.rs +++ b/crates/ra_syntax/src/syntax_node.rs | |||
@@ -1,13 +1,12 @@ | |||
1 | pub mod syntax_error; | ||
2 | mod syntax_text; | ||
3 | |||
4 | use std::{fmt, borrow::Borrow}; | 1 | use std::{fmt, borrow::Borrow}; |
5 | 2 | ||
6 | use self::syntax_text::SyntaxText; | ||
7 | use crate::{SmolStr, SyntaxKind, TextRange}; | ||
8 | use rowan::{Types, TransparentNewType}; | 3 | use rowan::{Types, TransparentNewType}; |
9 | 4 | ||
10 | pub use self::syntax_error::{SyntaxError, SyntaxErrorKind, Location}; | 5 | use crate::{ |
6 | SmolStr, SyntaxKind, TextRange, SyntaxText, | ||
7 | syntax_error::SyntaxError, | ||
8 | }; | ||
9 | |||
11 | pub use rowan::WalkEvent; | 10 | pub use rowan::WalkEvent; |
12 | 11 | ||
13 | #[derive(Debug, Clone, Copy)] | 12 | #[derive(Debug, Clone, Copy)] |
diff --git a/crates/ra_syntax/src/syntax_node/syntax_text.rs b/crates/ra_syntax/src/syntax_text.rs index 84e5b231a..84e5b231a 100644 --- a/crates/ra_syntax/src/syntax_node/syntax_text.rs +++ b/crates/ra_syntax/src/syntax_text.rs | |||
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index 10672d6bf..69958f0d7 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs | |||
@@ -5,7 +5,7 @@ mod string; | |||
5 | mod block; | 5 | mod block; |
6 | 6 | ||
7 | use crate::{ | 7 | use crate::{ |
8 | SourceFile, syntax_node::SyntaxError, AstNode, | 8 | SourceFile, SyntaxError, AstNode, |
9 | ast, | 9 | ast, |
10 | algo::visit::{visitor_ctx, VisitorCtx}, | 10 | algo::visit::{visitor_ctx, VisitorCtx}, |
11 | }; | 11 | }; |
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs index de949d967..f2cf3cbbd 100644 --- a/crates/ra_syntax/src/validation/block.rs +++ b/crates/ra_syntax/src/validation/block.rs | |||
@@ -1,9 +1,7 @@ | |||
1 | use crate::{SyntaxKind::*, | 1 | use crate::{SyntaxKind::*, |
2 | ast::{self, AttrsOwner, AstNode}, | 2 | ast::{self, AttrsOwner, AstNode}, |
3 | syntax_node::{ | 3 | SyntaxError, |
4 | SyntaxError, | 4 | SyntaxErrorKind::*, |
5 | SyntaxErrorKind::*, | ||
6 | }, | ||
7 | }; | 5 | }; |
8 | 6 | ||
9 | pub(crate) fn validate_block_node(node: &ast::Block, errors: &mut Vec<SyntaxError>) { | 7 | pub(crate) fn validate_block_node(node: &ast::Block, errors: &mut Vec<SyntaxError>) { |
diff --git a/crates/ra_syntax/src/validation/byte.rs b/crates/ra_syntax/src/validation/byte.rs index acdc12552..838e7a65f 100644 --- a/crates/ra_syntax/src/validation/byte.rs +++ b/crates/ra_syntax/src/validation/byte.rs | |||
@@ -5,10 +5,8 @@ use crate::{ | |||
5 | string_lexing::{self, StringComponentKind}, | 5 | string_lexing::{self, StringComponentKind}, |
6 | TextRange, | 6 | TextRange, |
7 | validation::char, | 7 | validation::char, |
8 | syntax_node::{ | 8 | SyntaxError, |
9 | SyntaxError, | 9 | SyntaxErrorKind::*, |
10 | SyntaxErrorKind::*, | ||
11 | }, | ||
12 | }; | 10 | }; |
13 | 11 | ||
14 | pub(super) fn validate_byte_node(node: &ast::Byte, errors: &mut Vec<SyntaxError>) { | 12 | pub(super) fn validate_byte_node(node: &ast::Byte, errors: &mut Vec<SyntaxError>) { |
diff --git a/crates/ra_syntax/src/validation/byte_string.rs b/crates/ra_syntax/src/validation/byte_string.rs index 69a98b640..64c7054a1 100644 --- a/crates/ra_syntax/src/validation/byte_string.rs +++ b/crates/ra_syntax/src/validation/byte_string.rs | |||
@@ -1,10 +1,8 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | ast::{self, AstNode, AstToken}, | 2 | ast::{self, AstNode, AstToken}, |
3 | string_lexing::{self, StringComponentKind}, | 3 | string_lexing::{self, StringComponentKind}, |
4 | syntax_node::{ | 4 | SyntaxError, |
5 | SyntaxError, | 5 | SyntaxErrorKind::*, |
6 | SyntaxErrorKind::*, | ||
7 | }, | ||
8 | }; | 6 | }; |
9 | 7 | ||
10 | use super::byte; | 8 | use super::byte; |
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs index 26c15e36d..3169ed590 100644 --- a/crates/ra_syntax/src/validation/char.rs +++ b/crates/ra_syntax/src/validation/char.rs | |||
@@ -8,10 +8,8 @@ use crate::{ | |||
8 | ast::{self, AstNode, AstToken}, | 8 | ast::{self, AstNode, AstToken}, |
9 | string_lexing::{self, StringComponentKind}, | 9 | string_lexing::{self, StringComponentKind}, |
10 | TextRange, | 10 | TextRange, |
11 | syntax_node::{ | 11 | SyntaxError, |
12 | SyntaxError, | 12 | SyntaxErrorKind::*, |
13 | SyntaxErrorKind::*, | ||
14 | }, | ||
15 | }; | 13 | }; |
16 | 14 | ||
17 | pub(super) fn validate_char_node(node: &ast::Char, errors: &mut Vec<SyntaxError>) { | 15 | pub(super) fn validate_char_node(node: &ast::Char, errors: &mut Vec<SyntaxError>) { |
diff --git a/crates/ra_syntax/src/validation/string.rs b/crates/ra_syntax/src/validation/string.rs index 2f7f9c7c4..d857d088c 100644 --- a/crates/ra_syntax/src/validation/string.rs +++ b/crates/ra_syntax/src/validation/string.rs | |||
@@ -1,10 +1,8 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | ast::{self, AstNode, AstToken}, | 2 | ast::{self, AstNode, AstToken}, |
3 | string_lexing, | 3 | string_lexing, |
4 | syntax_node::{ | 4 | SyntaxError, |
5 | SyntaxError, | 5 | SyntaxErrorKind::*, |
6 | SyntaxErrorKind::*, | ||
7 | }, | ||
8 | }; | 6 | }; |
9 | 7 | ||
10 | use super::char; | 8 | use super::char; |