diff options
author | Aleksey Kladov <[email protected]> | 2020-08-12 17:26:51 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-12 17:30:53 +0100 |
commit | a1c187eef3ba08076aedb5154929f7eda8d1b424 (patch) | |
tree | 9d898eb9600b0c36a74e4f95238f679c683fa566 /crates/ra_hir_expand | |
parent | 3d6889cba72a9d02199f7adaa2ecc69bc30af834 (diff) |
Rename ra_syntax -> syntax
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r-- | crates/ra_hir_expand/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/ast_id_map.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/builtin_derive.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/builtin_macro.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 10 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/diagnostics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/eager.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/hygiene.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/name.rs | 6 |
10 files changed, 17 insertions, 17 deletions
diff --git a/crates/ra_hir_expand/Cargo.toml b/crates/ra_hir_expand/Cargo.toml index 052330fde..153a70bdf 100644 --- a/crates/ra_hir_expand/Cargo.toml +++ b/crates/ra_hir_expand/Cargo.toml | |||
@@ -15,7 +15,7 @@ rustc-hash = "1.0.0" | |||
15 | 15 | ||
16 | arena = { path = "../arena" } | 16 | arena = { path = "../arena" } |
17 | ra_db = { path = "../ra_db" } | 17 | ra_db = { path = "../ra_db" } |
18 | ra_syntax = { path = "../ra_syntax" } | 18 | syntax = { path = "../syntax" } |
19 | parser = { path = "../parser" } | 19 | parser = { path = "../parser" } |
20 | profile = { path = "../profile" } | 20 | profile = { path = "../profile" } |
21 | tt = { path = "../tt" } | 21 | tt = { path = "../tt" } |
diff --git a/crates/ra_hir_expand/src/ast_id_map.rs b/crates/ra_hir_expand/src/ast_id_map.rs index 703a85b0f..f63629b30 100644 --- a/crates/ra_hir_expand/src/ast_id_map.rs +++ b/crates/ra_hir_expand/src/ast_id_map.rs | |||
@@ -13,7 +13,7 @@ use std::{ | |||
13 | }; | 13 | }; |
14 | 14 | ||
15 | use arena::{Arena, Idx}; | 15 | use arena::{Arena, Idx}; |
16 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr}; | 16 | use syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr}; |
17 | 17 | ||
18 | /// `AstId` points to an AST node in a specific file. | 18 | /// `AstId` points to an AST node in a specific file. |
19 | pub struct FileAstId<N: AstNode> { | 19 | pub struct FileAstId<N: AstNode> { |
diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs index 95e6977f2..2d2f8bcb8 100644 --- a/crates/ra_hir_expand/src/builtin_derive.rs +++ b/crates/ra_hir_expand/src/builtin_derive.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use log::debug; | 3 | use log::debug; |
4 | 4 | ||
5 | use parser::FragmentKind; | 5 | use parser::FragmentKind; |
6 | use ra_syntax::{ | 6 | use syntax::{ |
7 | ast::{self, AstNode, GenericParamsOwner, ModuleItemOwner, NameOwner}, | 7 | ast::{self, AstNode, GenericParamsOwner, ModuleItemOwner, NameOwner}, |
8 | match_ast, | 8 | match_ast, |
9 | }; | 9 | }; |
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index 24dc0b4e7..ae4c84382 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs | |||
@@ -8,7 +8,7 @@ use either::Either; | |||
8 | use mbe::parse_to_token_tree; | 8 | use mbe::parse_to_token_tree; |
9 | use parser::FragmentKind; | 9 | use parser::FragmentKind; |
10 | use ra_db::FileId; | 10 | use ra_db::FileId; |
11 | use ra_syntax::ast::{self, AstToken, HasStringValue}; | 11 | use syntax::ast::{self, AstToken, HasStringValue}; |
12 | 12 | ||
13 | macro_rules! register_builtin { | 13 | macro_rules! register_builtin { |
14 | ( LAZY: $(($name:ident, $kind: ident) => $expand:ident),* , EAGER: $(($e_name:ident, $e_kind: ident) => $e_expand:ident),* ) => { | 14 | ( LAZY: $(($name:ident, $kind: ident) => $expand:ident),* , EAGER: $(($e_name:ident, $e_kind: ident) => $e_expand:ident),* ) => { |
@@ -427,8 +427,8 @@ mod tests { | |||
427 | MacroCallLoc, | 427 | MacroCallLoc, |
428 | }; | 428 | }; |
429 | use ra_db::{fixture::WithFixture, SourceDatabase}; | 429 | use ra_db::{fixture::WithFixture, SourceDatabase}; |
430 | use ra_syntax::ast::NameOwner; | ||
431 | use std::sync::Arc; | 430 | use std::sync::Arc; |
431 | use syntax::ast::NameOwner; | ||
432 | 432 | ||
433 | fn expand_builtin_macro(ra_fixture: &str) -> String { | 433 | fn expand_builtin_macro(ra_fixture: &str) -> String { |
434 | let (db, file_id) = TestDB::with_single_file(&ra_fixture); | 434 | let (db, file_id) = TestDB::with_single_file(&ra_fixture); |
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index d83c391a9..c275f6b01 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -5,7 +5,7 @@ use std::sync::Arc; | |||
5 | use mbe::{ExpandResult, MacroRules}; | 5 | use mbe::{ExpandResult, MacroRules}; |
6 | use parser::FragmentKind; | 6 | use parser::FragmentKind; |
7 | use ra_db::{salsa, SourceDatabase}; | 7 | use ra_db::{salsa, SourceDatabase}; |
8 | use ra_syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; | 8 | use syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | ast_id_map::AstIdMap, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallLoc, EagerMacroId, | 11 | ast_id_map::AstIdMap, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallLoc, EagerMacroId, |
@@ -92,9 +92,9 @@ pub trait AstDatabase: SourceDatabase { | |||
92 | pub fn expand_hypothetical( | 92 | pub fn expand_hypothetical( |
93 | db: &dyn AstDatabase, | 93 | db: &dyn AstDatabase, |
94 | actual_macro_call: MacroCallId, | 94 | actual_macro_call: MacroCallId, |
95 | hypothetical_args: &ra_syntax::ast::TokenTree, | 95 | hypothetical_args: &syntax::ast::TokenTree, |
96 | token_to_map: ra_syntax::SyntaxToken, | 96 | token_to_map: syntax::SyntaxToken, |
97 | ) -> Option<(SyntaxNode, ra_syntax::SyntaxToken)> { | 97 | ) -> Option<(SyntaxNode, syntax::SyntaxToken)> { |
98 | let macro_file = MacroFile { macro_call_id: actual_macro_call }; | 98 | let macro_file = MacroFile { macro_call_id: actual_macro_call }; |
99 | let (tt, tmap_1) = mbe::syntax_node_to_token_tree(hypothetical_args.syntax()).unwrap(); | 99 | let (tt, tmap_1) = mbe::syntax_node_to_token_tree(hypothetical_args.syntax()).unwrap(); |
100 | let range = | 100 | let range = |
@@ -105,7 +105,7 @@ pub fn expand_hypothetical( | |||
105 | parse_macro_with_arg(db, macro_file, Some(std::sync::Arc::new((tt, tmap_1))))?; | 105 | parse_macro_with_arg(db, macro_file, Some(std::sync::Arc::new((tt, tmap_1))))?; |
106 | let token_id = macro_def.0.map_id_down(token_id); | 106 | let token_id = macro_def.0.map_id_down(token_id); |
107 | let range = tmap_2.range_by_token(token_id)?.by_kind(token_to_map.kind())?; | 107 | let range = tmap_2.range_by_token(token_id)?.by_kind(token_to_map.kind())?; |
108 | let token = ra_syntax::algo::find_covering_element(&node.syntax_node(), range).into_token()?; | 108 | let token = syntax::algo::find_covering_element(&node.syntax_node(), range).into_token()?; |
109 | Some((node.syntax_node(), token)) | 109 | Some((node.syntax_node(), token)) |
110 | } | 110 | } |
111 | 111 | ||
diff --git a/crates/ra_hir_expand/src/diagnostics.rs b/crates/ra_hir_expand/src/diagnostics.rs index b138500e7..59d35debe 100644 --- a/crates/ra_hir_expand/src/diagnostics.rs +++ b/crates/ra_hir_expand/src/diagnostics.rs | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | use std::{any::Any, fmt}; | 17 | use std::{any::Any, fmt}; |
18 | 18 | ||
19 | use ra_syntax::SyntaxNodePtr; | 19 | use syntax::SyntaxNodePtr; |
20 | 20 | ||
21 | use crate::InFile; | 21 | use crate::InFile; |
22 | 22 | ||
diff --git a/crates/ra_hir_expand/src/eager.rs b/crates/ra_hir_expand/src/eager.rs index dc83044ea..bd3409f97 100644 --- a/crates/ra_hir_expand/src/eager.rs +++ b/crates/ra_hir_expand/src/eager.rs | |||
@@ -27,8 +27,8 @@ use crate::{ | |||
27 | 27 | ||
28 | use parser::FragmentKind; | 28 | use parser::FragmentKind; |
29 | use ra_db::CrateId; | 29 | use ra_db::CrateId; |
30 | use ra_syntax::{algo::SyntaxRewriter, SyntaxNode}; | ||
31 | use std::sync::Arc; | 30 | use std::sync::Arc; |
31 | use syntax::{algo::SyntaxRewriter, SyntaxNode}; | ||
32 | 32 | ||
33 | pub fn expand_eager_macro( | 33 | pub fn expand_eager_macro( |
34 | db: &dyn AstDatabase, | 34 | db: &dyn AstDatabase, |
diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs index aefe47bd3..23b5eac27 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs | |||
@@ -4,7 +4,7 @@ | |||
4 | //! this moment, this is horribly incomplete and handles only `$crate`. | 4 | //! this moment, this is horribly incomplete and handles only `$crate`. |
5 | use either::Either; | 5 | use either::Either; |
6 | use ra_db::CrateId; | 6 | use ra_db::CrateId; |
7 | use ra_syntax::ast; | 7 | use syntax::ast; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
10 | db::AstDatabase, | 10 | db::AstDatabase, |
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index 38f0ffff8..af0cc445f 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs | |||
@@ -19,7 +19,7 @@ use std::hash::Hash; | |||
19 | use std::sync::Arc; | 19 | use std::sync::Arc; |
20 | 20 | ||
21 | use ra_db::{impl_intern_key, salsa, CrateId, FileId}; | 21 | use ra_db::{impl_intern_key, salsa, CrateId, FileId}; |
22 | use ra_syntax::{ | 22 | use syntax::{ |
23 | algo, | 23 | algo, |
24 | ast::{self, AstNode}, | 24 | ast::{self, AstNode}, |
25 | SyntaxNode, SyntaxToken, TextSize, | 25 | SyntaxNode, SyntaxToken, TextSize, |
diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 969a2e5b8..4dcaff088 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use std::fmt; | 3 | use std::fmt; |
4 | 4 | ||
5 | use ra_syntax::{ast, SmolStr}; | 5 | use syntax::{ast, SmolStr}; |
6 | 6 | ||
7 | /// `Name` is a wrapper around string, which is used in hir for both references | 7 | /// `Name` is a wrapper around string, which is used in hir for both references |
8 | /// and declarations. In theory, names should also carry hygiene info, but we are | 8 | /// and declarations. In theory, names should also carry hygiene info, but we are |
@@ -37,8 +37,8 @@ impl Name { | |||
37 | Name(Repr::TupleField(idx)) | 37 | Name(Repr::TupleField(idx)) |
38 | } | 38 | } |
39 | 39 | ||
40 | pub fn new_lifetime(lt: &ra_syntax::SyntaxToken) -> Name { | 40 | pub fn new_lifetime(lt: &syntax::SyntaxToken) -> Name { |
41 | assert!(lt.kind() == ra_syntax::SyntaxKind::LIFETIME); | 41 | assert!(lt.kind() == syntax::SyntaxKind::LIFETIME); |
42 | Name(Repr::Text(lt.text().clone())) | 42 | Name(Repr::Text(lt.text().clone())) |
43 | } | 43 | } |
44 | 44 | ||