11//! This is a generated file, please do not edit manually. Changes can be
22//! made in codegeneration that lives in `xtask` top-level dir.
33
4- use crate :: cst:: support;
5- use crate :: cst:: CstChildren ;
6- use crate :: cst:: CstNode ;
7- use crate :: SyntaxKind ;
8- use crate :: SyntaxKind :: * ;
9- use crate :: SyntaxNode ;
10- use crate :: SyntaxToken ;
11- use crate :: S ;
4+ use crate :: {
5+ cst:: { support, CstChildren , CstNode } ,
6+ SyntaxKind :: { self , * } ,
7+ SyntaxNode , SyntaxToken , S ,
8+ } ;
129#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
1310pub struct Name {
1411 pub ( crate ) syntax : SyntaxNode ,
@@ -32,6 +29,9 @@ pub struct OperationDefinition {
3229 pub ( crate ) syntax : SyntaxNode ,
3330}
3431impl OperationDefinition {
32+ pub fn description ( & self ) -> Option < Description > {
33+ support:: child ( & self . syntax )
34+ }
3535 pub fn operation_type ( & self ) -> Option < OperationType > {
3636 support:: child ( & self . syntax )
3737 }
@@ -53,6 +53,9 @@ pub struct FragmentDefinition {
5353 pub ( crate ) syntax : SyntaxNode ,
5454}
5555impl FragmentDefinition {
56+ pub fn description ( & self ) -> Option < Description > {
57+ support:: child ( & self . syntax )
58+ }
5659 pub fn fragment_token ( & self ) -> Option < SyntaxToken > {
5760 support:: token ( & self . syntax , S ! [ fragment] )
5861 }
@@ -406,6 +409,15 @@ impl InputObjectTypeExtension {
406409 }
407410}
408411#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
412+ pub struct Description {
413+ pub ( crate ) syntax : SyntaxNode ,
414+ }
415+ impl Description {
416+ pub fn string_value ( & self ) -> Option < StringValue > {
417+ support:: child ( & self . syntax )
418+ }
419+ }
420+ #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
409421pub struct OperationType {
410422 pub ( crate ) syntax : SyntaxNode ,
411423}
@@ -700,6 +712,9 @@ pub struct VariableDefinition {
700712 pub ( crate ) syntax : SyntaxNode ,
701713}
702714impl VariableDefinition {
715+ pub fn description ( & self ) -> Option < Description > {
716+ support:: child ( & self . syntax )
717+ }
703718 pub fn variable ( & self ) -> Option < Variable > {
704719 support:: child ( & self . syntax )
705720 }
@@ -774,15 +789,6 @@ impl Directive {
774789 }
775790}
776791#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
777- pub struct Description {
778- pub ( crate ) syntax : SyntaxNode ,
779- }
780- impl Description {
781- pub fn string_value ( & self ) -> Option < StringValue > {
782- support:: child ( & self . syntax )
783- }
784- }
785- #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
786792pub struct RootOperationTypeDefinition {
787793 pub ( crate ) syntax : SyntaxNode ,
788794}
@@ -1351,6 +1357,21 @@ impl CstNode for InputObjectTypeExtension {
13511357 & self . syntax
13521358 }
13531359}
1360+ impl CstNode for Description {
1361+ fn can_cast ( kind : SyntaxKind ) -> bool {
1362+ kind == DESCRIPTION
1363+ }
1364+ fn cast ( syntax : SyntaxNode ) -> Option < Self > {
1365+ if Self :: can_cast ( syntax. kind ( ) ) {
1366+ Some ( Self { syntax } )
1367+ } else {
1368+ None
1369+ }
1370+ }
1371+ fn syntax ( & self ) -> & SyntaxNode {
1372+ & self . syntax
1373+ }
1374+ }
13541375impl CstNode for OperationType {
13551376 fn can_cast ( kind : SyntaxKind ) -> bool {
13561377 kind == OPERATION_TYPE
@@ -1771,21 +1792,6 @@ impl CstNode for Directive {
17711792 & self . syntax
17721793 }
17731794}
1774- impl CstNode for Description {
1775- fn can_cast ( kind : SyntaxKind ) -> bool {
1776- kind == DESCRIPTION
1777- }
1778- fn cast ( syntax : SyntaxNode ) -> Option < Self > {
1779- if Self :: can_cast ( syntax. kind ( ) ) {
1780- Some ( Self { syntax } )
1781- } else {
1782- None
1783- }
1784- }
1785- fn syntax ( & self ) -> & SyntaxNode {
1786- & self . syntax
1787- }
1788- }
17891795impl CstNode for RootOperationTypeDefinition {
17901796 fn can_cast ( kind : SyntaxKind ) -> bool {
17911797 kind == ROOT_OPERATION_TYPE_DEFINITION
0 commit comments