aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast/generated.rs.tera
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-31 13:10:37 +0100
committerAleksey Kladov <[email protected]>2018-08-31 13:10:37 +0100
commit78d60a549d0711ffea10e2898bff46ebc739f637 (patch)
tree6333fd564c04dab2b73f71761f1d26d040b5ed0e /crates/libsyntax2/src/ast/generated.rs.tera
parent05a9d42f542c8eb876d06791579d948b2f571e04 (diff)
default method name to type name
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs.tera')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs.tera7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs.tera b/crates/libsyntax2/src/ast/generated.rs.tera
index 69f9236b7..a72e9b732 100644
--- a/crates/libsyntax2/src/ast/generated.rs.tera
+++ b/crates/libsyntax2/src/ast/generated.rs.tera
@@ -65,8 +65,15 @@ impl<'a> {{ node }}<'a> {
65 65
66{%- if methods.options -%} 66{%- if methods.options -%}
67{%- for m in methods.options -%} 67{%- for m in methods.options -%}
68
69{%- if m is string -%}
70{%- set method_name = m | snake -%}
71{%- set ChildName = m %}
72{%- else -%}
68{%- set method_name = m.0 -%} 73{%- set method_name = m.0 -%}
69{%- set ChildName = m.1 %} 74{%- set ChildName = m.1 %}
75{%- endif -%}
76
70 pub fn {{ method_name }}(self) -> Option<{{ ChildName }}<'a>> { 77 pub fn {{ method_name }}(self) -> Option<{{ ChildName }}<'a>> {
71 super::child_opt(self) 78 super::child_opt(self)
72 } 79 }