From a1c187eef3ba08076aedb5154929f7eda8d1b424 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 18:26:51 +0200 Subject: Rename ra_syntax -> syntax --- crates/ra_mbe/Cargo.toml | 2 +- crates/ra_mbe/src/mbe_expander.rs | 4 ++-- crates/ra_mbe/src/mbe_expander/matcher.rs | 2 +- crates/ra_mbe/src/mbe_expander/transcriber.rs | 2 +- crates/ra_mbe/src/parser.rs | 2 +- crates/ra_mbe/src/subtree_source.rs | 2 +- crates/ra_mbe/src/syntax_bridge.rs | 8 ++++---- crates/ra_mbe/src/tests.rs | 8 ++++---- 8 files changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/ra_mbe') 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" doctest = false [dependencies] -ra_syntax = { path = "../ra_syntax" } +syntax = { path = "../syntax" } parser = { path = "../parser" } tt = { path = "../tt" } 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 @@ mod matcher; mod transcriber; -use ra_syntax::SmolStr; use rustc_hash::FxHashMap; +use syntax::SmolStr; use crate::{ExpandError, ExpandResult}; @@ -123,7 +123,7 @@ enum Fragment { #[cfg(test)] mod tests { - use ra_syntax::{ast, AstNode}; + use syntax::{ast, AstNode}; use super::*; 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::{ use super::ExpandResult; use parser::{FragmentKind::*, TreeSink}; -use ra_syntax::{SmolStr, SyntaxKind}; +use syntax::{SmolStr, SyntaxKind}; use tt::buffer::{Cursor, TokenBuffer}; 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 @@ //! Transcriber takes a template, like `fn $ident() {}`, a set of bindings like //! `$ident => foo`, interpolates variables in the template, to get `fn foo() {}` -use ra_syntax::SmolStr; +use syntax::SmolStr; use super::ExpandResult; 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 @@ //! Parser recognizes special macro syntax, `$var` and `$(repeat)*`, in token //! trees. -use ra_syntax::SmolStr; use smallvec::SmallVec; +use syntax::SmolStr; use crate::{tt_iter::TtIter, ExpandError}; 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 @@ //! FIXME: write short doc here use parser::{Token, TokenSource}; -use ra_syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; use std::cell::{Cell, Ref, RefCell}; +use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; use tt::buffer::{Cursor, TokenBuffer}; #[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 @@ //! FIXME: write short doc here use parser::{FragmentKind, ParseError, TreeSink}; -use ra_syntax::{ +use rustc_hash::FxHashMap; +use syntax::{ ast::{self, make::tokens::doc_comment}, tokenize, AstToken, Parse, SmolStr, SyntaxKind, SyntaxKind::*, SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, Token as RawToken, T, }; -use rustc_hash::FxHashMap; use tt::buffer::{Cursor, TokenBuffer}; use crate::subtree_source::SubtreeTokenSource; @@ -176,7 +176,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr { text.into() } -fn convert_doc_comment(token: &ra_syntax::SyntaxToken) -> Option> { +fn convert_doc_comment(token: &syntax::SyntaxToken) -> Option> { let comment = ast::Comment::cast(token.clone())?; let doc = comment.kind().doc?; @@ -716,7 +716,7 @@ mod tests { use super::*; use crate::tests::parse_macro; use parser::TokenSource; - use ra_syntax::{ + use syntax::{ algo::{insert_children, InsertPosition}, ast::AstNode, }; 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 @@ use std::fmt::Write; use ::parser::FragmentKind; -use ra_syntax::{ast, AstNode, NodeOrToken, SyntaxKind::IDENT, SyntaxNode, WalkEvent, T}; +use syntax::{ast, AstNode, NodeOrToken, SyntaxKind::IDENT, SyntaxNode, WalkEvent, T}; use test_utils::assert_eq_text; use super::*; mod rule_parsing { - use ra_syntax::{ast, AstNode}; + use syntax::{ast, AstNode}; use crate::ast_to_token_tree; @@ -1698,7 +1698,7 @@ pub(crate) fn parse_to_token_tree_by_syntax(ra_fixture: &str) -> tt::Subtree { parsed } -fn debug_dump_ignore_spaces(node: &ra_syntax::SyntaxNode) -> String { +fn debug_dump_ignore_spaces(node: &syntax::SyntaxNode) -> String { let mut level = 0; let mut buf = String::new(); macro_rules! indent { @@ -1718,7 +1718,7 @@ fn debug_dump_ignore_spaces(node: &ra_syntax::SyntaxNode) -> String { writeln!(buf, "{:?}", node.kind()).unwrap(); } NodeOrToken::Token(token) => match token.kind() { - ra_syntax::SyntaxKind::WHITESPACE => {} + syntax::SyntaxKind::WHITESPACE => {} _ => { indent!(); writeln!(buf, "{:?}", token.kind()).unwrap(); -- cgit v1.2.3