diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-12 17:31:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-12 17:31:42 +0100 |
commit | d583f2c46d22cf8d643ebf98be9cb7059a304431 (patch) | |
tree | 9d898eb9600b0c36a74e4f95238f679c683fa566 /crates/ra_mbe | |
parent | 3d6889cba72a9d02199f7adaa2ecc69bc30af834 (diff) | |
parent | a1c187eef3ba08076aedb5154929f7eda8d1b424 (diff) |
Merge #5729
5729: Rename ra_syntax -> syntax
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r-- | crates/ra_mbe/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_mbe/src/mbe_expander.rs | 4 | ||||
-rw-r--r-- | crates/ra_mbe/src/mbe_expander/matcher.rs | 2 | ||||
-rw-r--r-- | crates/ra_mbe/src/mbe_expander/transcriber.rs | 2 | ||||
-rw-r--r-- | crates/ra_mbe/src/parser.rs | 2 | ||||
-rw-r--r-- | crates/ra_mbe/src/subtree_source.rs | 2 | ||||
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 8 | ||||
-rw-r--r-- | crates/ra_mbe/src/tests.rs | 8 |
8 files changed, 15 insertions, 15 deletions
diff --git a/crates/ra_mbe/Cargo.toml b/crates/ra_mbe/Cargo.toml index e518f73e3..4a4be65eb 100644 --- a/crates/ra_mbe/Cargo.toml +++ b/crates/ra_mbe/Cargo.toml | |||
@@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" | |||
9 | doctest = false | 9 | doctest = false |
10 | 10 | ||
11 | [dependencies] | 11 | [dependencies] |
12 | ra_syntax = { path = "../ra_syntax" } | 12 | syntax = { path = "../syntax" } |
13 | parser = { path = "../parser" } | 13 | parser = { path = "../parser" } |
14 | tt = { path = "../tt" } | 14 | tt = { path = "../tt" } |
15 | rustc-hash = "1.1.0" | 15 | rustc-hash = "1.1.0" |
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs index b1eacf124..1ad8b9f8a 100644 --- a/crates/ra_mbe/src/mbe_expander.rs +++ b/crates/ra_mbe/src/mbe_expander.rs | |||
@@ -5,8 +5,8 @@ | |||
5 | mod matcher; | 5 | mod matcher; |
6 | mod transcriber; | 6 | mod transcriber; |
7 | 7 | ||
8 | use ra_syntax::SmolStr; | ||
9 | use rustc_hash::FxHashMap; | 8 | use rustc_hash::FxHashMap; |
9 | use syntax::SmolStr; | ||
10 | 10 | ||
11 | use crate::{ExpandError, ExpandResult}; | 11 | use crate::{ExpandError, ExpandResult}; |
12 | 12 | ||
@@ -123,7 +123,7 @@ enum Fragment { | |||
123 | 123 | ||
124 | #[cfg(test)] | 124 | #[cfg(test)] |
125 | mod tests { | 125 | mod tests { |
126 | use ra_syntax::{ast, AstNode}; | 126 | use syntax::{ast, AstNode}; |
127 | 127 | ||
128 | use super::*; | 128 | use super::*; |
129 | use crate::ast_to_token_tree; | 129 | use crate::ast_to_token_tree; |
diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/ra_mbe/src/mbe_expander/matcher.rs index c752804b2..b698b9832 100644 --- a/crates/ra_mbe/src/mbe_expander/matcher.rs +++ b/crates/ra_mbe/src/mbe_expander/matcher.rs | |||
@@ -10,7 +10,7 @@ use crate::{ | |||
10 | 10 | ||
11 | use super::ExpandResult; | 11 | use super::ExpandResult; |
12 | use parser::{FragmentKind::*, TreeSink}; | 12 | use parser::{FragmentKind::*, TreeSink}; |
13 | use ra_syntax::{SmolStr, SyntaxKind}; | 13 | use syntax::{SmolStr, SyntaxKind}; |
14 | use tt::buffer::{Cursor, TokenBuffer}; | 14 | use tt::buffer::{Cursor, TokenBuffer}; |
15 | 15 | ||
16 | impl Bindings { | 16 | impl Bindings { |
diff --git a/crates/ra_mbe/src/mbe_expander/transcriber.rs b/crates/ra_mbe/src/mbe_expander/transcriber.rs index 7c9bb4d00..c9525c5bf 100644 --- a/crates/ra_mbe/src/mbe_expander/transcriber.rs +++ b/crates/ra_mbe/src/mbe_expander/transcriber.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! Transcriber takes a template, like `fn $ident() {}`, a set of bindings like | 1 | //! Transcriber takes a template, like `fn $ident() {}`, a set of bindings like |
2 | //! `$ident => foo`, interpolates variables in the template, to get `fn foo() {}` | 2 | //! `$ident => foo`, interpolates variables in the template, to get `fn foo() {}` |
3 | 3 | ||
4 | use ra_syntax::SmolStr; | 4 | use syntax::SmolStr; |
5 | 5 | ||
6 | use super::ExpandResult; | 6 | use super::ExpandResult; |
7 | use crate::{ | 7 | use crate::{ |
diff --git a/crates/ra_mbe/src/parser.rs b/crates/ra_mbe/src/parser.rs index 1e5dafbdf..6b46a1673 100644 --- a/crates/ra_mbe/src/parser.rs +++ b/crates/ra_mbe/src/parser.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | //! Parser recognizes special macro syntax, `$var` and `$(repeat)*`, in token | 1 | //! Parser recognizes special macro syntax, `$var` and `$(repeat)*`, in token |
2 | //! trees. | 2 | //! trees. |
3 | 3 | ||
4 | use ra_syntax::SmolStr; | ||
5 | use smallvec::SmallVec; | 4 | use smallvec::SmallVec; |
5 | use syntax::SmolStr; | ||
6 | 6 | ||
7 | use crate::{tt_iter::TtIter, ExpandError}; | 7 | use crate::{tt_iter::TtIter, ExpandError}; |
8 | 8 | ||
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs index 1a1cb08cf..41461b315 100644 --- a/crates/ra_mbe/src/subtree_source.rs +++ b/crates/ra_mbe/src/subtree_source.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use parser::{Token, TokenSource}; | 3 | use parser::{Token, TokenSource}; |
4 | use ra_syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; | ||
5 | use std::cell::{Cell, Ref, RefCell}; | 4 | use std::cell::{Cell, Ref, RefCell}; |
5 | use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; | ||
6 | use tt::buffer::{Cursor, TokenBuffer}; | 6 | use tt::buffer::{Cursor, TokenBuffer}; |
7 | 7 | ||
8 | #[derive(Debug, Clone, Eq, PartialEq)] | 8 | #[derive(Debug, Clone, Eq, PartialEq)] |
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 7b9c88ae6..a8ad917fb 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -1,13 +1,13 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use parser::{FragmentKind, ParseError, TreeSink}; | 3 | use parser::{FragmentKind, ParseError, TreeSink}; |
4 | use ra_syntax::{ | 4 | use rustc_hash::FxHashMap; |
5 | use syntax::{ | ||
5 | ast::{self, make::tokens::doc_comment}, | 6 | ast::{self, make::tokens::doc_comment}, |
6 | tokenize, AstToken, Parse, SmolStr, SyntaxKind, | 7 | tokenize, AstToken, Parse, SmolStr, SyntaxKind, |
7 | SyntaxKind::*, | 8 | SyntaxKind::*, |
8 | SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, Token as RawToken, T, | 9 | SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, Token as RawToken, T, |
9 | }; | 10 | }; |
10 | use rustc_hash::FxHashMap; | ||
11 | use tt::buffer::{Cursor, TokenBuffer}; | 11 | use tt::buffer::{Cursor, TokenBuffer}; |
12 | 12 | ||
13 | use crate::subtree_source::SubtreeTokenSource; | 13 | use crate::subtree_source::SubtreeTokenSource; |
@@ -176,7 +176,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr { | |||
176 | text.into() | 176 | text.into() |
177 | } | 177 | } |
178 | 178 | ||
179 | fn convert_doc_comment(token: &ra_syntax::SyntaxToken) -> Option<Vec<tt::TokenTree>> { | 179 | fn convert_doc_comment(token: &syntax::SyntaxToken) -> Option<Vec<tt::TokenTree>> { |
180 | let comment = ast::Comment::cast(token.clone())?; | 180 | let comment = ast::Comment::cast(token.clone())?; |
181 | let doc = comment.kind().doc?; | 181 | let doc = comment.kind().doc?; |
182 | 182 | ||
@@ -716,7 +716,7 @@ mod tests { | |||
716 | use super::*; | 716 | use super::*; |
717 | use crate::tests::parse_macro; | 717 | use crate::tests::parse_macro; |
718 | use parser::TokenSource; | 718 | use parser::TokenSource; |
719 | use ra_syntax::{ | 719 | use syntax::{ |
720 | algo::{insert_children, InsertPosition}, | 720 | algo::{insert_children, InsertPosition}, |
721 | ast::AstNode, | 721 | ast::AstNode, |
722 | }; | 722 | }; |
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index be39b0e45..0796ceee1 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs | |||
@@ -1,13 +1,13 @@ | |||
1 | use std::fmt::Write; | 1 | use std::fmt::Write; |
2 | 2 | ||
3 | use ::parser::FragmentKind; | 3 | use ::parser::FragmentKind; |
4 | use ra_syntax::{ast, AstNode, NodeOrToken, SyntaxKind::IDENT, SyntaxNode, WalkEvent, T}; | 4 | use syntax::{ast, AstNode, NodeOrToken, SyntaxKind::IDENT, SyntaxNode, WalkEvent, T}; |
5 | use test_utils::assert_eq_text; | 5 | use test_utils::assert_eq_text; |
6 | 6 | ||
7 | use super::*; | 7 | use super::*; |
8 | 8 | ||
9 | mod rule_parsing { | 9 | mod rule_parsing { |
10 | use ra_syntax::{ast, AstNode}; | 10 | use syntax::{ast, AstNode}; |
11 | 11 | ||
12 | use crate::ast_to_token_tree; | 12 | use crate::ast_to_token_tree; |
13 | 13 | ||
@@ -1698,7 +1698,7 @@ pub(crate) fn parse_to_token_tree_by_syntax(ra_fixture: &str) -> tt::Subtree { | |||
1698 | parsed | 1698 | parsed |
1699 | } | 1699 | } |
1700 | 1700 | ||
1701 | fn debug_dump_ignore_spaces(node: &ra_syntax::SyntaxNode) -> String { | 1701 | fn debug_dump_ignore_spaces(node: &syntax::SyntaxNode) -> String { |
1702 | let mut level = 0; | 1702 | let mut level = 0; |
1703 | let mut buf = String::new(); | 1703 | let mut buf = String::new(); |
1704 | macro_rules! indent { | 1704 | macro_rules! indent { |
@@ -1718,7 +1718,7 @@ fn debug_dump_ignore_spaces(node: &ra_syntax::SyntaxNode) -> String { | |||
1718 | writeln!(buf, "{:?}", node.kind()).unwrap(); | 1718 | writeln!(buf, "{:?}", node.kind()).unwrap(); |
1719 | } | 1719 | } |
1720 | NodeOrToken::Token(token) => match token.kind() { | 1720 | NodeOrToken::Token(token) => match token.kind() { |
1721 | ra_syntax::SyntaxKind::WHITESPACE => {} | 1721 | syntax::SyntaxKind::WHITESPACE => {} |
1722 | _ => { | 1722 | _ => { |
1723 | indent!(); | 1723 | indent!(); |
1724 | writeln!(buf, "{:?}", token.kind()).unwrap(); | 1724 | writeln!(buf, "{:?}", token.kind()).unwrap(); |