diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-23 11:36:33 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-23 11:36:33 +0100 |
commit | 8a49f937936e7c7a886fc859905bb40f53bc47e3 (patch) | |
tree | 3b2de8ba1568c55067a644ee497c454518ed6007 /crates/ra_syntax | |
parent | 085891d8855bb905c2ba12c1618bace410253926 (diff) | |
parent | cb958cf5fec8b051d16833ac0890cace379ad765 (diff) |
Merge #5497
5497: Store macro invocation parameters as text instead of tt r=jonas-schievink a=lnicola
We don't want to expand macros on every source change because it can be arbitrarily slow, but the token trees can be rather large. So instead we can cache the invocation parameters (as text).
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 4 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_node.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index 9b7664576..ac59455e7 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -42,8 +42,6 @@ use std::{marker::PhantomData, sync::Arc}; | |||
42 | use ra_text_edit::Indel; | 42 | use ra_text_edit::Indel; |
43 | use stdx::format_to; | 43 | use stdx::format_to; |
44 | 44 | ||
45 | use crate::syntax_node::GreenNode; | ||
46 | |||
47 | pub use crate::{ | 45 | pub use crate::{ |
48 | algo::InsertPosition, | 46 | algo::InsertPosition, |
49 | ast::{AstNode, AstToken}, | 47 | ast::{AstNode, AstToken}, |
@@ -51,7 +49,7 @@ pub use crate::{ | |||
51 | ptr::{AstPtr, SyntaxNodePtr}, | 49 | ptr::{AstPtr, SyntaxNodePtr}, |
52 | syntax_error::SyntaxError, | 50 | syntax_error::SyntaxError, |
53 | syntax_node::{ | 51 | syntax_node::{ |
54 | Direction, NodeOrToken, SyntaxElement, SyntaxElementChildren, SyntaxNode, | 52 | Direction, GreenNode, NodeOrToken, SyntaxElement, SyntaxElementChildren, SyntaxNode, |
55 | SyntaxNodeChildren, SyntaxToken, SyntaxTreeBuilder, | 53 | SyntaxNodeChildren, SyntaxToken, SyntaxTreeBuilder, |
56 | }, | 54 | }, |
57 | }; | 55 | }; |
diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs index 9650b8781..a7dbdba7b 100644 --- a/crates/ra_syntax/src/syntax_node.rs +++ b/crates/ra_syntax/src/syntax_node.rs | |||
@@ -10,7 +10,9 @@ use rowan::{GreenNodeBuilder, Language}; | |||
10 | 10 | ||
11 | use crate::{Parse, SmolStr, SyntaxError, SyntaxKind, TextSize}; | 11 | use crate::{Parse, SmolStr, SyntaxError, SyntaxKind, TextSize}; |
12 | 12 | ||
13 | pub(crate) use rowan::{GreenNode, GreenToken}; | 13 | pub use rowan::GreenNode; |
14 | |||
15 | pub(crate) use rowan::GreenToken; | ||
14 | 16 | ||
15 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | 17 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
16 | pub enum RustLanguage {} | 18 | pub enum RustLanguage {} |