From 7b28a15202fd22c726ed6e8c2d31e30a19d8e623 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 22 Jan 2019 23:37:03 +0300 Subject: :arrow_up: rowan --- crates/ra_syntax/Cargo.toml | 2 +- crates/ra_syntax/src/yellow.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml index 05cf41a8d..c50dc6c67 100644 --- a/crates/ra_syntax/Cargo.toml +++ b/crates/ra_syntax/Cargo.toml @@ -13,7 +13,7 @@ unicode-xid = "0.1.0" itertools = "0.8.0" drop_bomb = "0.1.4" parking_lot = "0.7.0" -rowan = "0.3.1" +rowan = "0.3.2" # ideally, `serde` should be enabled by `ra_lsp_serder`, but we enable it here # to reduce number of compilations diff --git a/crates/ra_syntax/src/yellow.rs b/crates/ra_syntax/src/yellow.rs index 9b93945cc..a7bfb80e2 100644 --- a/crates/ra_syntax/src/yellow.rs +++ b/crates/ra_syntax/src/yellow.rs @@ -177,6 +177,10 @@ impl SyntaxNode { pub fn children(&self) -> SyntaxNodeChildren { SyntaxNodeChildren(self.0.children()) } + + pub fn memory_size_of_subtree(&self) -> usize { + self.0.memory_size_of_subtree() + } } impl fmt::Debug for SyntaxNode { -- cgit v1.2.3