mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
bump ron
This commit is contained in:
parent
35b59bb438
commit
7581984601
3 changed files with 20 additions and 3 deletions
|
@ -19,4 +19,15 @@ impl<R: TreeRoot> AstNode<R> for {{ Name }}<R> {
|
|||
}
|
||||
fn syntax(&self) -> &SyntaxNode<R> { &self.syntax }
|
||||
}
|
||||
|
||||
impl<R: TreeRoot> {{ Name }}<R> {
|
||||
{% for (method_name, kind) in node.opts %}
|
||||
{% set ChildName = kind | camel %}
|
||||
pub fn {{ method_name }}<'a>(&'a self) -> impl Iterator<Item = {{ ChildKind }}<R>> + 'a {
|
||||
self.syntax()
|
||||
.children()
|
||||
.filter_map({{ ChildKind }}::cast)
|
||||
}
|
||||
{% endfor %}
|
||||
}
|
||||
{% endfor %}
|
||||
|
|
|
@ -215,10 +215,16 @@ Grammar(
|
|||
],
|
||||
ast: [
|
||||
(
|
||||
kind: "FILE"
|
||||
kind: "FILE",
|
||||
collections: [
|
||||
("functions", "FUNCTION")
|
||||
]
|
||||
),
|
||||
(
|
||||
kind: "FUNCTION"
|
||||
kind: "FUNCTION",
|
||||
options: [
|
||||
("name", "NAME")
|
||||
]
|
||||
),
|
||||
(
|
||||
kind: "NAME"
|
||||
|
|
|
@ -5,7 +5,7 @@ authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
|
|||
publish = false
|
||||
|
||||
[dependencies]
|
||||
ron = "0.1.7"
|
||||
ron = "0.3.0"
|
||||
walkdir = "2.1.3"
|
||||
itertools = "0.7.8"
|
||||
tera = "0.11"
|
||||
|
|
Loading…
Reference in a new issue