aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast/generated.rs.tera
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs.tera')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs.tera8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs.tera b/crates/libsyntax2/src/ast/generated.rs.tera
index 86b8b05d1..3d79b5543 100644
--- a/crates/libsyntax2/src/ast/generated.rs.tera
+++ b/crates/libsyntax2/src/ast/generated.rs.tera
@@ -1,9 +1,11 @@
1use std::sync::Arc; 1use std::sync::Arc;
2use { 2use {
3 ast,
3 SyntaxNode, SyntaxRoot, TreeRoot, AstNode, 4 SyntaxNode, SyntaxRoot, TreeRoot, AstNode,
4 SyntaxKind::*, 5 SyntaxKind::*,
5}; 6};
6{% for node, methods in ast %} 7{% for node, methods in ast %}
8// {{ node }}
7#[derive(Debug, Clone, Copy)] 9#[derive(Debug, Clone, Copy)]
8pub struct {{ node }}<R: TreeRoot = Arc<SyntaxRoot>> { 10pub struct {{ node }}<R: TreeRoot = Arc<SyntaxRoot>> {
9 syntax: SyntaxNode<R>, 11 syntax: SyntaxNode<R>,
@@ -19,6 +21,12 @@ impl<R: TreeRoot> AstNode<R> for {{ node }}<R> {
19 fn syntax(&self) -> &SyntaxNode<R> { &self.syntax } 21 fn syntax(&self) -> &SyntaxNode<R> { &self.syntax }
20} 22}
21 23
24{% if methods.traits -%}
25{%- for t in methods.traits -%}
26impl<R: TreeRoot> ast::{{ t }}<R> for {{ node }}<R> {}
27{% endfor -%}
28{%- endif -%}
29
22impl<R: TreeRoot> {{ node }}<R> { 30impl<R: TreeRoot> {{ node }}<R> {
23{%- if methods.collections -%} 31{%- if methods.collections -%}
24{%- for m in methods.collections -%} 32{%- for m in methods.collections -%}