aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/lib.rs6
-rw-r--r--crates/ra_syntax/src/parsing.rs3
-rw-r--r--crates/ra_syntax/src/parsing/builder.rs5
-rw-r--r--crates/ra_syntax/src/parsing/parser_impl.rs15
-rw-r--r--crates/ra_syntax/src/parsing/parser_impl/event.rs2
-rw-r--r--crates/ra_syntax/src/parsing/reparsing.rs3
-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.rs11
-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.rs2
-rw-r--r--crates/ra_syntax/src/validation/block.rs6
-rw-r--r--crates/ra_syntax/src/validation/byte.rs6
-rw-r--r--crates/ra_syntax/src/validation/byte_string.rs6
-rw-r--r--crates/ra_syntax/src/validation/char.rs6
-rw-r--r--crates/ra_syntax/src/validation/string.rs6
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;
26mod validation; 26mod validation;
27mod syntax_node; 27mod syntax_node;
28mod ptr; 28mod ptr;
29mod syntax_error;
30mod syntax_text;
29 31
30pub use rowan::{SmolStr, TextRange, TextUnit}; 32pub use rowan::{SmolStr, TextRange, TextUnit};
31pub use crate::{ 33pub 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;
8mod grammar; 8mod grammar;
9 9
10use crate::{ 10use crate::{
11 SyntaxError,
11 parsing::builder::GreenBuilder, 12 parsing::builder::GreenBuilder,
12 syntax_node::{GreenNode, SyntaxError}, 13 syntax_node::GreenNode,
13}; 14};
14 15
15pub use self::lexer::{tokenize, Token}; 16pub 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 @@
1use crate::{ 1use 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
6use rowan::GreenNodeBuilder; 7use rowan::GreenNodeBuilder;
7 8
8pub(crate) struct GreenBuilder { 9pub(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
6use crate::{ 6use 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
18use crate::SyntaxKind::{self, EOF, TOMBSTONE}; 19use 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 @@
1use crate::{ 1use 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 @@
1pub mod syntax_error;
2mod syntax_text;
3
4use std::{fmt, borrow::Borrow}; 1use std::{fmt, borrow::Borrow};
5 2
6use self::syntax_text::SyntaxText;
7use crate::{SmolStr, SyntaxKind, TextRange};
8use rowan::{Types, TransparentNewType}; 3use rowan::{Types, TransparentNewType};
9 4
10pub use self::syntax_error::{SyntaxError, SyntaxErrorKind, Location}; 5use crate::{
6 SmolStr, SyntaxKind, TextRange, SyntaxText,
7 syntax_error::SyntaxError,
8};
9
11pub use rowan::WalkEvent; 10pub 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;
5mod block; 5mod block;
6 6
7use crate::{ 7use 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 @@
1use crate::{SyntaxKind::*, 1use 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
9pub(crate) fn validate_block_node(node: &ast::Block, errors: &mut Vec<SyntaxError>) { 7pub(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
14pub(super) fn validate_byte_node(node: &ast::Byte, errors: &mut Vec<SyntaxError>) { 12pub(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 @@
1use crate::{ 1use 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
10use super::byte; 8use 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
17pub(super) fn validate_char_node(node: &ast::Char, errors: &mut Vec<SyntaxError>) { 15pub(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 @@
1use crate::{ 1use 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
10use super::char; 8use super::char;