File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
apollo-parser/src/parser/grammar Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,8 @@ pub(crate) fn variable_definitions(p: &mut Parser) {
2626 }
2727
2828 // Continue parsing while we see descriptions or variables
29- loop {
30- match p. peek ( ) {
31- Some ( TokenKind :: StringValue | T ! [ $] ) => variable_definition ( p) ,
32- _ => break ,
33- }
29+ while let Some ( TokenKind :: StringValue | T ! [ $] ) = p. peek ( ) {
30+ variable_definition ( p) ;
3431 }
3532
3633 p. expect ( T ! [ ')' ] , S ! [ ')' ] ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ pub struct FragmentDef {
2525impl From < FragmentDef > for ast:: Definition {
2626 fn from ( x : FragmentDef ) -> Self {
2727 ast:: FragmentDefinition {
28+ description : None ,
2829 name : x. name . into ( ) ,
2930 type_condition : x. type_condition . name . into ( ) ,
3031 directives : Directive :: to_ast ( x. directives ) ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub struct OperationDef {
2828impl From < OperationDef > for ast:: Definition {
2929 fn from ( x : OperationDef ) -> Self {
3030 ast:: OperationDefinition {
31+ description : None ,
3132 operation_type : x. operation_type . into ( ) ,
3233 name : x. name . map ( Into :: into) ,
3334 directives : Directive :: to_ast ( x. directives ) ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ pub struct VariableDef {
2727impl From < VariableDef > for ast:: VariableDefinition {
2828 fn from ( x : VariableDef ) -> Self {
2929 Self {
30+ description : None ,
3031 name : x. name . into ( ) ,
3132 ty : Node :: new ( x. ty . into ( ) ) ,
3233 default_value : x. default_value . map ( |x| Node :: new ( x. into ( ) ) ) ,
You can’t perform that action at this time.
0 commit comments