private DirectiveDefinitionNode ParseDirectiveDefinition(ParserContext context) { SyntaxToken start = context.Current; StringValueNode description = ParseDescription(context); context.ExpectDirectiveKeyword(); context.ExpectAt(); NameNode name = context.ParseName(); List <InputValueDefinitionNode> arguments = ParseArgumentDefinitions(context); context.ExpectOnKeyword(); List <NameNode> locations = ParseDirectiveLocations(context); Location location = context.CreateLocation(start); return(new DirectiveDefinitionNode ( location, name, description, arguments, locations )); }
private DirectiveNode ParseDirective( ParserContext context, bool isConstant) { SyntaxToken start = context.Current; context.ExpectAt(); NameNode name = context.ParseName(); List <ArgumentNode> arguments = ParseArguments(context, isConstant); Location location = context.CreateLocation(start); return(new DirectiveNode ( location, name, arguments )); }