File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ class Parser {
433
433
return {
434
434
kind : Kind . ARGUMENT ,
435
435
name : this . parseName ( ) ,
436
- value : ( this . expectToken ( TokenKind . COLON ) , this . parseConstValue ( ) ) ,
436
+ value : ( this . expectToken ( TokenKind . COLON ) , this . parseValueLiteral ( true ) ) ,
437
437
loc : this . loc ( start ) ,
438
438
} ;
439
439
}
@@ -597,22 +597,14 @@ class Parser {
597
597
} ;
598
598
}
599
599
600
- parseConstValue ( ) : ValueNode {
601
- return this . parseValueLiteral ( true ) ;
602
- }
603
-
604
- parseValueValue ( ) : ValueNode {
605
- return this . parseValueLiteral ( false ) ;
606
- }
607
-
608
600
/**
609
601
* ListValue[Const] :
610
602
* - [ ]
611
603
* - [ Value[?Const]+ ]
612
604
*/
613
605
parseList ( isConst : boolean ) : ListValueNode {
614
606
const start = this . _lexer . token ;
615
- const item = isConst ? this . parseConstValue : this . parseValueValue ;
607
+ const item = ( ) = > this . parseValueLiteral ( isConst ) ;
616
608
return {
617
609
kind : Kind . LIST ,
618
610
values : this . any ( TokenKind . BRACKET_L , item , TokenKind . BRACKET_R ) ,
@@ -949,7 +941,7 @@ class Parser {
949
941
const type = this . parseTypeReference ( ) ;
950
942
let defaultValue ;
951
943
if ( this . expectOptionalToken ( TokenKind . EQUALS ) ) {
952
- defaultValue = this . parseConstValue ( ) ;
944
+ defaultValue = this . parseValueLiteral ( true ) ;
953
945
}
954
946
const directives = this . parseDirectives ( true ) ;
955
947
return {
You can’t perform that action at this time.
0 commit comments