aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/grammar/params.rs7
-rw-r--r--crates/ra_syntax/src/yellow.rs4
2 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/grammar/params.rs b/crates/ra_syntax/src/grammar/params.rs
index 658fc5820..13158429a 100644
--- a/crates/ra_syntax/src/grammar/params.rs
+++ b/crates/ra_syntax/src/grammar/params.rs
@@ -79,7 +79,12 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
79 let la1 = p.nth(1); 79 let la1 = p.nth(1);
80 let la2 = p.nth(2); 80 let la2 = p.nth(2);
81 let la3 = p.nth(3); 81 let la3 = p.nth(3);
82 if la0 == IDENT && la1 == COLON 82
83 // test trait_fn_placeholder_parameter
84 // trait Foo {
85 // fn bar(_: u64);
86 // }
87 if (la0 == IDENT || la0 == UNDERSCORE) && la1 == COLON
83 || la0 == AMP && la1 == IDENT && la2 == COLON 88 || la0 == AMP && la1 == IDENT && la2 == COLON
84 || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON 89 || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON
85 { 90 {
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 {
177 pub fn children(&self) -> SyntaxNodeChildren { 177 pub fn children(&self) -> SyntaxNodeChildren {
178 SyntaxNodeChildren(self.0.children()) 178 SyntaxNodeChildren(self.0.children())
179 } 179 }
180
181 pub fn memory_size_of_subtree(&self) -> usize {
182 self.0.memory_size_of_subtree()
183 }
180} 184}
181 185
182impl fmt::Debug for SyntaxNode { 186impl fmt::Debug for SyntaxNode {