From a05fdac735ade29df53c5bfaef57c544930dc3b7 Mon Sep 17 00:00:00 2001 From: Robert Mosolgo Date: Fri, 16 Feb 2024 10:31:51 -0500 Subject: [PATCH 1/2] Support variable definition directives --- lib/graphql/language/nodes.rb | 2 +- lib/graphql/language/parser.rb | 12 +++++++++++- lib/graphql/language/printer.rb | 4 ++++ spec/graphql/language/parser_spec.rb | 5 +++++ spec/graphql/language/printer_spec.rb | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/graphql/language/nodes.rb b/lib/graphql/language/nodes.rb index 893ccc2dbb..f1f8f6c0be 100644 --- a/lib/graphql/language/nodes.rb +++ b/lib/graphql/language/nodes.rb @@ -512,7 +512,7 @@ class NonNullType < WrapperType # An operation-level query variable class VariableDefinition < AbstractNode scalar_methods :name, :type, :default_value - children_methods false + children_methods(directives: Directive) # @!attribute default_value # @return [String, Integer, Float, Boolean, Array, NullValue] A Ruby value to use if no other value is provided diff --git a/lib/graphql/language/parser.rb b/lib/graphql/language/parser.rb index 5fbe199260..6c69c75388 100644 --- a/lib/graphql/language/parser.rb +++ b/lib/graphql/language/parser.rb @@ -121,7 +121,17 @@ def definition value end - defs << Nodes::VariableDefinition.new(pos: loc, name: var_name, type: var_type, default_value: default_value, filename: @filename, source_string: @graphql_str) + directives = parse_directives + + defs << Nodes::VariableDefinition.new( + pos: loc, + name: var_name, + type: var_type, + default_value: default_value, + directives: directives, + filename: @filename, + source_string: @graphql_str + ) end expect_token(:RPAREN) defs diff --git a/lib/graphql/language/printer.rb b/lib/graphql/language/printer.rb index 44fb005bfe..04563c2c1d 100644 --- a/lib/graphql/language/printer.rb +++ b/lib/graphql/language/printer.rb @@ -208,6 +208,10 @@ def print_variable_definition(variable_definition) print_string(" = ") print_node(variable_definition.default_value) end + variable_definition.directives.each do |dir| + print_string(" ") + print_directive(dir) + end end def print_variable_identifier(variable_identifier) diff --git a/spec/graphql/language/parser_spec.rb b/spec/graphql/language/parser_spec.rb index 6d2713abd7..553b335d78 100644 --- a/spec/graphql/language/parser_spec.rb +++ b/spec/graphql/language/parser_spec.rb @@ -24,6 +24,11 @@ end end + it "parses directives on variable definitions" do + ast = GraphQL.parse("query($var: Int = 1 @special) { do(something: $var) }") + assert_equal ["special"], ast.definitions.first.variables.first.directives.map(&:name) + end + it "allows fragments, fields and arguments named null" do assert GraphQL.parse("{ field(null: false) ... null } fragment null on Query { null }") end diff --git a/spec/graphql/language/printer_spec.rb b/spec/graphql/language/printer_spec.rb index 98fe0366f8..4752e8edc3 100644 --- a/spec/graphql/language/printer_spec.rb +++ b/spec/graphql/language/printer_spec.rb @@ -4,7 +4,7 @@ describe GraphQL::Language::Printer do let(:document) { GraphQL.parse(query_string) } let(:query_string) {%| - query getStuff($someVar: Int = 1, $anotherVar: [String!], $skipNested: Boolean! = false) @skip(if: false) { + query getStuff($someVar: Int = 1, $anotherVar: [String!] @special(very: true), $skipNested: Boolean! = false) @skip(if: false) { myField: someField(someArg: $someVar, ok: 1.4) @skip(if: $anotherVar) @thing(or: "Whatever") anotherField(someArg: [1, 2, 3]) { nestedField From 3e81518a17bbf65180afcbb1912184e452de6de0 Mon Sep 17 00:00:00 2001 From: Robert Mosolgo Date: Fri, 16 Feb 2024 10:37:35 -0500 Subject: [PATCH 2/2] Parse variable definition directives in C parser --- .../ext/graphql_c_parser_ext/parser.c | 838 +++++++++--------- .../ext/graphql_c_parser_ext/parser.y | 7 +- 2 files changed, 428 insertions(+), 417 deletions(-) diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/parser.c b/graphql-c_parser/ext/graphql_c_parser_ext/parser.c index 04b67a9aa6..9a8d7517a5 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/parser.c +++ b/graphql-c_parser/ext/graphql_c_parser_ext/parser.c @@ -716,7 +716,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 79 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 772 +#define YYLAST 808 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 40 @@ -725,7 +725,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 182 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 310 +#define YYNSTATES 311 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 257 @@ -776,23 +776,23 @@ static const yytype_int16 yyrline[] = { 0, 103, 103, 105, 119, 120, 123, 124, 125, 128, 129, 132, 143, 154, 167, 168, 169, 172, 173, 176, - 177, 180, 181, 184, 195, 196, 199, 200, 203, 204, - 205, 208, 211, 212, 215, 226, 239, 240, 243, 244, - 247, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 268, 269, 270, 272, 280, 289, 290, 293, 294, 297, - 298, 299, 300, 302, 311, 320, 321, 324, 325, 328, - 339, 348, 349, 352, 353, 356, 367, 368, 371, 372, - 374, 384, 385, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 402, 403, 404, 405, 406, - 407, 411, 421, 430, 441, 453, 454, 457, 458, 461, - 468, 477, 478, 479, 482, 495, 496, 499, 503, 508, - 513, 514, 515, 516, 517, 518, 520, 523, 524, 527, - 539, 553, 554, 555, 556, 559, 567, 573, 581, 586, - 600, 601, 604, 605, 608, 622, 623, 626, 627, 628, - 631, 645, 653, 658, 671, 684, 696, 697, 700, 713, - 727, 728, 731, 732, 736, 737, 740, 751, 763, 764, - 765, 766, 767, 768, 770, 780, 792, 804, 813, 824, - 833, 844, 853 + 177, 180, 181, 184, 196, 197, 200, 201, 204, 205, + 206, 209, 212, 213, 216, 227, 240, 241, 244, 245, + 248, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 269, 270, 271, 273, 281, 290, 291, 294, 295, 298, + 299, 300, 301, 303, 312, 321, 322, 325, 326, 329, + 340, 349, 350, 353, 354, 357, 368, 369, 372, 373, + 375, 385, 386, 389, 390, 391, 392, 393, 394, 395, + 396, 397, 398, 399, 400, 403, 404, 405, 406, 407, + 408, 412, 422, 431, 442, 454, 455, 458, 459, 462, + 469, 478, 479, 480, 483, 496, 497, 500, 504, 509, + 514, 515, 516, 517, 518, 519, 521, 524, 525, 528, + 540, 554, 555, 556, 557, 560, 568, 574, 582, 587, + 601, 602, 605, 606, 609, 623, 624, 627, 628, 629, + 632, 646, 654, 659, 672, 685, 697, 698, 701, 714, + 728, 729, 732, 733, 737, 738, 741, 752, 764, 765, + 766, 767, 768, 769, 771, 781, 793, 805, 814, 825, + 834, 845, 854 }; #endif @@ -850,7 +850,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-192) +#define YYPACT_NINF (-259) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -864,37 +864,38 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 85, 245, 701, 437, -192, -192, 9, -192, -192, 18, - -192, 28, -192, -192, -192, 668, -192, -192, -192, -192, - -192, 60, -192, -192, -192, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192, -192, 668, 668, - 668, 668, 9, 668, 668, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -5, 536, -192, -192, 470, -192, - -192, 12, -192, -192, -192, 668, 1, 9, -192, -192, - -192, 7, -192, 82, 668, 668, 668, 668, 668, 668, - 9, 9, 50, 9, 70, 6, 50, 9, 569, 569, - 79, 9, -192, -192, 668, 668, 9, 89, -4, -192, - -192, 76, 9, 668, 9, 9, 50, 9, 50, 9, - 93, 6, 104, 6, 212, 9, 9, -4, 9, 124, - 40, 569, -192, 9, 123, 9, 602, -192, -192, 89, - 635, -192, 138, 79, -192, 154, 103, -192, 668, 74, - -192, 79, 140, 143, 146, 9, -192, 9, 158, 135, - 135, 668, 264, 173, 668, 161, 152, 161, 668, 155, - 79, -192, 79, 503, 9, -192, -192, 370, -192, -192, - 668, -192, -192, 179, -192, -192, -192, 135, 156, 135, - 135, 161, 161, 668, 734, -192, 25, 668, -192, 44, - -192, 173, 668, -192, 75, -192, -192, -192, -192, 159, - -192, -192, -192, -192, 79, -192, -192, -192, -192, 301, - 668, -192, -192, -192, -192, 668, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192, -192, 569, 59, - -192, 163, 102, 113, -192, -192, 159, 9, -192, -192, - 184, -192, -192, -192, 668, -192, 117, 668, -192, -192, - -192, 336, 167, 668, -192, 168, 668, -192, 187, -192, - 191, -192, 668, -192, -192, -192, 569, 140, -192, -192, - -192, -192, -192, -192, -192, 197, -192, -192, 200, 370, - 404, -192, -192, 183, 191, 205, 370, 404, -192, -192, - 668, -192, 668, 9, 569, -192, -192, -192, 9, -192 + 232, 14, 737, 473, -259, -259, 7, -259, -259, 23, + -259, 202, -259, -259, -259, 704, -259, -259, -259, -259, + -259, 144, -259, -259, -259, -259, -259, -259, -259, -259, + -259, -259, -259, -259, -259, -259, -259, -259, 704, 704, + 704, 704, 7, 704, 704, -259, -259, -259, -259, -259, + -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, + -259, -259, -259, -259, 19, 572, -259, -259, 506, -259, + -259, 12, -259, -259, -259, 704, 41, 7, -259, -259, + -259, 38, -259, 59, 704, 704, 704, 704, 704, 704, + 7, 7, 62, 7, 73, 6, 62, 7, 605, 605, + 75, 7, -259, -259, 704, 704, 7, 58, 70, -259, + -259, 65, 7, 704, 7, 7, 62, 7, 62, 7, + 77, 6, 91, 6, 304, 7, 7, 70, 7, 104, + 122, 605, -259, 7, 114, 7, 638, -259, -259, 58, + 671, -259, 117, 75, -259, 118, 80, -259, 704, -10, + -259, 75, 106, 109, 113, 7, -259, 7, 133, 110, + 110, 704, 260, 151, 704, 126, 183, 126, 704, 128, + 75, -259, 75, 539, 7, -259, -259, 406, -259, -259, + 704, -259, -259, 159, -259, -259, -259, 110, 136, 110, + 110, 126, 126, 704, 770, -259, -18, 704, -259, 24, + -259, 151, 704, -259, 39, -259, -259, -259, -259, 142, + -259, -259, -259, -259, 75, -259, -259, -259, -259, 338, + 704, -259, -259, -259, -259, 704, -259, -259, -259, -259, + -259, -259, -259, -259, -259, -259, -259, -259, 605, 107, + -259, 146, 66, 79, -259, -259, 142, 7, -259, -259, + 167, -259, -259, -259, 704, -259, 82, 704, -259, -259, + -259, 372, 149, 704, -259, 150, 704, -259, 168, -259, + 170, -259, 704, -259, -259, -259, 605, 106, -259, -259, + -259, -259, -259, -259, -259, 178, -259, -259, 179, 406, + 440, 7, -259, 161, 170, 180, 406, 440, -259, -259, + 704, -259, -259, 704, 7, 605, -259, -259, -259, 7, + -259 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -931,22 +932,23 @@ static const yytype_uint8 yydefact[] = 57, 0, 0, 66, 67, 0, 72, 73, 0, 54, 24, 143, 0, 154, 158, 155, 0, 142, 146, 149, 152, 56, 58, 64, 68, 0, 70, 74, 0, 0, - 0, 23, 162, 159, 24, 0, 0, 0, 50, 69, - 71, 25, 0, 76, 0, 75, 163, 139, 76, 144 + 0, 76, 162, 159, 24, 0, 0, 0, 50, 69, + 71, 25, 23, 0, 76, 0, 75, 163, 139, 76, + 144 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -192, -192, -192, -192, 202, -192, -192, 14, -192, -192, - -192, 65, -78, 94, -66, -95, 11, -192, -96, -192, - 81, -141, -174, -192, -192, -192, -192, 46, -192, -192, - -192, -192, -31, -192, -192, -192, -32, 38, -33, 77, - -3, -173, 4, -192, -192, -192, -192, -98, -192, -192, - -192, -192, 111, -122, -192, -192, 15, -192, -192, -86, - 80, -192, -191, -116, -34, -10, -97, -192, -192, 62, - -192, -192, -189, 63, -192, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192 + -259, -259, -259, -259, 177, -259, -259, 9, -259, -259, + -259, 43, -101, 60, -67, -95, -17, -259, -97, -259, + 61, -258, -174, -259, -259, -259, -259, 4, -259, -259, + -259, -259, -63, -259, -259, -259, -61, 34, -36, -52, + -3, -170, 2, -259, -259, -259, -259, -81, -259, -259, + -259, -259, 87, -138, -259, -259, 15, -259, -259, -26, + 46, -259, -180, -48, -68, -41, -103, -259, -259, 27, + -259, -259, -194, 32, -259, -259, -259, -259, -259, -259, + -259, -259, -259, -259, -259, -259, -259 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -968,166 +970,172 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 71, 135, 103, 228, 236, 137, 63, 249, 252, 95, - 128, 144, 82, 75, 15, 21, 75, 104, 79, 4, - 98, 236, 108, 5, 182, 15, 21, -77, -3, 111, - 155, 8, 157, 169, 105, 90, 91, 92, 93, 1, - 96, 97, 2, 174, 182, 260, 236, 75, 252, 3, - -77, 4, 252, 249, 248, 5, 186, 121, 123, 7, - 126, 6, 7, 8, 130, 71, 83, 124, 84, 101, - 207, 239, 107, 251, 243, 211, 85, 212, 7, 86, - 94, 114, 115, 116, 117, 118, 119, 282, 236, 113, - 271, 127, 87, 7, 244, 245, 1, 88, 89, 2, - 136, 139, 142, 100, -147, 184, 3, 103, 4, 7, - 152, 105, 5, 148, 159, 148, 236, 236, 6, 7, - 8, 162, 145, 236, 236, 160, 4, 171, 120, 122, - 5, 273, 181, 71, 168, 129, 7, 142, 8, 138, - 270, 145, 274, 177, 143, 183, 278, 7, 298, 301, - 151, 7, 153, 154, 110, 156, 305, 158, 200, 180, - 145, 203, 187, 165, 189, 208, 167, 190, 193, 7, - 71, 170, 110, 172, 194, 4, 202, 237, 294, 5, - 145, 206, 204, 210, 238, 257, 240, 8, 272, 276, - 208, 226, 289, 191, 250, 192, 283, 286, 110, 253, - 110, 290, 296, 110, 194, 297, 308, 110, 226, 302, - 304, 194, 214, 80, 185, 161, 303, 268, 45, 254, - 46, 176, 269, 47, 48, 258, 49, 50, 51, 52, - 173, 53, 284, 226, 287, 4, 54, 66, 166, 5, - 247, 201, 55, 295, 56, 57, 279, 8, 58, 59, - 60, 277, 242, 38, 280, 246, 0, 194, 0, 0, - 285, 39, 0, 288, 40, 0, 0, 0, 0, 292, - 0, 254, 0, 0, 0, 226, -137, 41, 42, -137, - 0, -137, 43, 44, 0, 275, 0, 0, -137, -137, - 0, 0, 0, 0, -137, 0, 0, 288, 0, 306, - -137, 0, 0, 226, 226, 0, 0, 45, 0, 46, - 226, 226, 47, 215, 216, 49, 217, 51, 52, 218, - 53, 219, 220, 0, 4, 221, 222, 0, 5, 259, - 0, 55, 0, 56, 57, 223, 8, 224, 59, 60, - 225, 307, 45, 0, 46, 0, 309, 47, 215, 216, + 71, 103, 249, 228, 63, 137, 95, 236, 182, 15, + 144, 248, 82, 75, 75, 21, 7, 104, 135, 252, + 15, 184, 38, 79, 236, 110, 21, -77, 182, 148, + 39, 298, 301, 40, 105, 90, 91, 92, 93, 306, + 96, 97, 174, 110, 98, 260, 41, 42, 249, 236, + 169, 43, 44, 251, 121, 123, 186, 126, 7, 252, + 111, 130, 108, 252, 207, 71, 113, 101, -147, 110, + 128, 110, 107, 7, 110, 211, 94, 212, 110, 124, + 105, 114, 115, 116, 117, 118, 119, 282, 244, 245, + 155, 236, 157, 4, 127, 273, 136, 5, 159, 100, + 7, 139, 142, 4, 148, 8, 103, 5, 274, 181, + 152, 278, 160, 7, 168, 8, 7, 145, 171, 236, + 236, 162, 177, 180, 120, 122, 236, 236, 187, 75, + 189, 129, -77, 71, 190, 138, 145, 142, 271, 239, + 143, 7, 243, 193, 7, 183, 151, 204, 153, 154, + 83, 156, 84, 158, 202, 145, 210, 270, 200, 165, + 85, 203, 167, 86, 238, 208, 240, 170, 257, 172, + 71, 272, 276, 289, 194, 145, 87, 237, 283, 286, + 290, 88, 89, 296, 297, 305, 226, 303, 80, 191, + 208, 192, 185, 304, 250, 294, 173, 258, 247, 253, + 284, 176, -3, 226, 194, 287, 4, 201, 214, 295, + 5, 194, 206, 1, 166, 279, 2, 268, 8, 254, + 246, 242, 269, 3, 309, 4, 0, 0, 226, 5, + 0, 0, 0, 0, 0, 6, 7, 8, 0, 0, + 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, + 0, 277, 0, 3, 280, 4, 0, 194, 0, 5, + 285, 0, 0, 288, 0, 6, 7, 8, 0, 292, + 226, 254, -137, 0, 0, -137, 0, -137, 0, 0, + 0, 275, 0, 0, -137, -137, 0, 0, 0, 0, + -137, 0, 0, 0, 0, 0, -137, 288, 226, 226, + 307, 0, 0, 0, 0, 226, 226, 161, 0, 0, + 45, 0, 46, 0, 0, 47, 48, 0, 49, 50, + 51, 52, 0, 53, 0, 302, 0, 4, 54, 66, + 0, 5, 0, 0, 55, 0, 56, 57, 308, 8, + 58, 59, 60, 310, 45, 0, 46, 0, 0, 47, + 215, 216, 49, 217, 51, 52, 218, 53, 219, 220, + 0, 4, 221, 222, 0, 5, 259, 0, 55, 0, + 56, 57, 223, 8, 224, 59, 60, 225, 45, 0, + 46, 0, 0, 47, 215, 216, 49, 217, 51, 52, + 218, 53, 219, 220, 0, 4, 221, 222, 0, 5, + 281, 0, 55, 0, 56, 57, 223, 8, 224, 59, + 60, 225, 45, 0, 46, 0, 0, 47, 215, 216, 49, 217, 51, 52, 218, 53, 219, 220, 0, 4, - 221, 222, 0, 5, 281, 0, 55, 0, 56, 57, + 221, 222, 0, 5, 0, 0, 55, 0, 56, 57, 223, 8, 224, 59, 60, 225, 45, 0, 46, 0, 0, 47, 215, 216, 49, 217, 51, 52, 218, 53, - 219, 220, 0, 4, 221, 222, 0, 5, 0, 0, - 55, 0, 56, 57, 223, 8, 224, 59, 60, 225, - 45, 0, 46, 0, 0, 47, 215, 216, 49, 217, - 51, 52, 218, 53, 219, 300, 0, 4, 221, 222, - 0, 5, 0, 0, 55, 0, 56, 57, 223, 8, - 224, 59, 60, 45, 0, 46, 65, 0, 47, 48, - 0, 49, 50, 51, 52, 0, 53, 0, 0, 0, - 4, 54, 66, 0, 5, 0, 67, 55, 0, 56, - 57, 0, 8, 58, 59, 60, 45, 0, 46, 65, - 0, 47, 48, 0, 49, 50, 51, 52, 0, 53, - 0, 0, 0, 4, 54, 66, 0, 5, 0, 102, - 55, 0, 56, 57, 0, 8, 58, 59, 60, 45, + 219, 300, 0, 4, 221, 222, 0, 5, 0, 0, + 55, 0, 56, 57, 223, 8, 224, 59, 60, 45, 0, 46, 65, 0, 47, 48, 0, 49, 50, 51, 52, 0, 53, 0, 0, 0, 4, 54, 66, 0, - 5, 0, 213, 55, 0, 56, 57, 0, 8, 58, - 59, 60, 45, 75, 46, 0, 0, 47, 48, 0, + 5, 0, 67, 55, 0, 56, 57, 0, 8, 58, + 59, 60, 45, 0, 46, 65, 0, 47, 48, 0, 49, 50, 51, 52, 0, 53, 0, 0, 0, 4, - 54, 99, 0, 5, 0, 0, 55, 0, 56, 57, - 0, 8, 58, 59, 60, 45, 0, 46, 0, 0, - 47, 48, 0, 49, 50, 51, 52, 0, 53, 131, - 0, 0, 4, 54, 66, 0, 5, 0, 0, 55, - 0, 56, 57, 0, 8, 58, 59, 60, 45, 0, - 46, 65, 0, 47, 48, 0, 49, 50, 51, 52, - 0, 53, 0, 0, 0, 4, 54, 66, 0, 5, + 54, 66, 0, 5, 0, 102, 55, 0, 56, 57, + 0, 8, 58, 59, 60, 45, 0, 46, 65, 0, + 47, 48, 0, 49, 50, 51, 52, 0, 53, 0, + 0, 0, 4, 54, 66, 0, 5, 0, 213, 55, + 0, 56, 57, 0, 8, 58, 59, 60, 45, 75, + 46, 0, 0, 47, 48, 0, 49, 50, 51, 52, + 0, 53, 0, 0, 0, 4, 54, 99, 0, 5, 0, 0, 55, 0, 56, 57, 0, 8, 58, 59, 60, 45, 0, 46, 0, 0, 47, 48, 0, 49, - 50, 51, 52, 0, 53, 0, 0, 0, 4, 54, - 66, 0, 5, 0, 0, 55, 175, 56, 57, 0, - 8, 58, 59, 60, 45, 0, 46, 0, 0, 47, + 50, 51, 52, 0, 53, 131, 0, 0, 4, 54, + 66, 0, 5, 0, 0, 55, 0, 56, 57, 0, + 8, 58, 59, 60, 45, 0, 46, 65, 0, 47, 48, 0, 49, 50, 51, 52, 0, 53, 0, 0, 0, 4, 54, 66, 0, 5, 0, 0, 55, 0, 56, 57, 0, 8, 58, 59, 60, 45, 0, 46, 0, 0, 47, 48, 0, 49, 50, 51, 52, 0, - 53, 0, 0, 0, 4, 54, 0, 0, 5, 0, - 0, 55, 0, 56, 57, 0, 8, 58, 59, 60, - 45, 0, 46, 0, 0, 47, 0, 0, 49, 217, - 51, 52, 0, 53, 0, 0, 0, 4, 0, 222, + 53, 0, 0, 0, 4, 54, 66, 0, 5, 0, + 0, 55, 175, 56, 57, 0, 8, 58, 59, 60, + 45, 0, 46, 0, 0, 47, 48, 0, 49, 50, + 51, 52, 0, 53, 0, 0, 0, 4, 54, 66, 0, 5, 0, 0, 55, 0, 56, 57, 0, 8, - 0, 59, 60 + 58, 59, 60, 45, 0, 46, 0, 0, 47, 48, + 0, 49, 50, 51, 52, 0, 53, 0, 0, 0, + 4, 54, 0, 0, 5, 0, 0, 55, 0, 56, + 57, 0, 8, 58, 59, 60, 45, 0, 46, 0, + 0, 47, 0, 0, 49, 217, 51, 52, 0, 53, + 0, 0, 0, 4, 0, 222, 0, 5, 0, 0, + 55, 0, 56, 57, 0, 8, 0, 59, 60 }; static const yytype_int16 yycheck[] = { - 3, 99, 68, 177, 177, 100, 2, 196, 199, 42, - 96, 107, 15, 7, 0, 0, 7, 5, 0, 23, - 25, 194, 21, 27, 146, 11, 11, 21, 0, 22, - 116, 35, 118, 131, 22, 38, 39, 40, 41, 11, - 43, 44, 14, 139, 166, 219, 219, 7, 239, 21, - 10, 23, 243, 242, 29, 27, 151, 90, 91, 34, - 93, 33, 34, 35, 97, 68, 6, 17, 8, 65, - 167, 187, 75, 29, 190, 170, 16, 172, 34, 19, - 42, 84, 85, 86, 87, 88, 89, 261, 261, 7, - 31, 21, 32, 34, 191, 192, 11, 37, 38, 14, - 21, 104, 105, 65, 29, 31, 21, 173, 23, 34, - 113, 22, 27, 39, 21, 39, 289, 290, 33, 34, - 35, 124, 108, 296, 297, 21, 23, 4, 90, 91, - 27, 29, 29, 136, 10, 97, 34, 140, 35, 101, - 238, 127, 29, 5, 106, 148, 29, 34, 289, 290, - 112, 34, 114, 115, 77, 117, 297, 119, 161, 5, - 146, 164, 22, 125, 21, 168, 128, 21, 10, 34, - 173, 133, 95, 135, 159, 23, 3, 180, 276, 27, - 166, 29, 21, 28, 5, 26, 30, 35, 25, 5, - 193, 177, 5, 155, 197, 157, 29, 29, 121, 202, - 123, 10, 5, 126, 189, 5, 304, 130, 194, 26, - 5, 196, 174, 11, 149, 3, 294, 220, 6, 204, - 8, 140, 225, 11, 12, 214, 14, 15, 16, 17, - 136, 19, 263, 219, 266, 23, 24, 25, 127, 27, - 194, 161, 30, 277, 32, 33, 256, 35, 36, 37, - 38, 254, 189, 8, 257, 193, -1, 242, -1, -1, - 263, 16, -1, 266, 19, -1, -1, -1, -1, 272, - -1, 256, -1, -1, -1, 261, 12, 32, 33, 15, - -1, 17, 37, 38, -1, 247, -1, -1, 24, 25, - -1, -1, -1, -1, 30, -1, -1, 300, -1, 302, - 36, -1, -1, 289, 290, -1, -1, 6, -1, 8, - 296, 297, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, -1, 23, 24, 25, -1, 27, 28, - -1, 30, -1, 32, 33, 34, 35, 36, 37, 38, - 39, 303, 6, -1, 8, -1, 308, 11, 12, 13, + 3, 68, 196, 177, 2, 100, 42, 177, 146, 0, + 107, 29, 15, 7, 7, 0, 34, 5, 99, 199, + 11, 31, 8, 0, 194, 77, 11, 21, 166, 39, + 16, 289, 290, 19, 22, 38, 39, 40, 41, 297, + 43, 44, 139, 95, 25, 219, 32, 33, 242, 219, + 131, 37, 38, 29, 90, 91, 151, 93, 34, 239, + 22, 97, 21, 243, 167, 68, 7, 65, 29, 121, + 96, 123, 75, 34, 126, 170, 42, 172, 130, 17, + 22, 84, 85, 86, 87, 88, 89, 261, 191, 192, + 116, 261, 118, 23, 21, 29, 21, 27, 21, 65, + 34, 104, 105, 23, 39, 35, 173, 27, 29, 29, + 113, 29, 21, 34, 10, 35, 34, 108, 4, 289, + 290, 124, 5, 5, 90, 91, 296, 297, 22, 7, + 21, 97, 10, 136, 21, 101, 127, 140, 31, 187, + 106, 34, 190, 10, 34, 148, 112, 21, 114, 115, + 6, 117, 8, 119, 3, 146, 28, 238, 161, 125, + 16, 164, 128, 19, 5, 168, 30, 133, 26, 135, + 173, 25, 5, 5, 159, 166, 32, 180, 29, 29, + 10, 37, 38, 5, 5, 5, 177, 26, 11, 155, + 193, 157, 149, 294, 197, 276, 136, 214, 194, 202, + 263, 140, 0, 194, 189, 266, 23, 161, 174, 277, + 27, 196, 29, 11, 127, 256, 14, 220, 35, 204, + 193, 189, 225, 21, 305, 23, -1, -1, 219, 27, + -1, -1, -1, -1, -1, 33, 34, 35, -1, -1, + -1, -1, -1, 11, -1, -1, 14, -1, -1, -1, + -1, 254, -1, 21, 257, 23, -1, 242, -1, 27, + 263, -1, -1, 266, -1, 33, 34, 35, -1, 272, + 261, 256, 12, -1, -1, 15, -1, 17, -1, -1, + -1, 247, -1, -1, 24, 25, -1, -1, -1, -1, + 30, -1, -1, -1, -1, -1, 36, 300, 289, 290, + 303, -1, -1, -1, -1, 296, 297, 3, -1, -1, + 6, -1, 8, -1, -1, 11, 12, -1, 14, 15, + 16, 17, -1, 19, -1, 291, -1, 23, 24, 25, + -1, 27, -1, -1, 30, -1, 32, 33, 304, 35, + 36, 37, 38, 309, 6, -1, 8, -1, -1, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + -1, 23, 24, 25, -1, 27, 28, -1, 30, -1, + 32, 33, 34, 35, 36, 37, 38, 39, 6, -1, + 8, -1, -1, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, -1, 23, 24, 25, -1, 27, + 28, -1, 30, -1, 32, 33, 34, 35, 36, 37, + 38, 39, 6, -1, 8, -1, -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, 23, - 24, 25, -1, 27, 28, -1, 30, -1, 32, 33, + 24, 25, -1, 27, -1, -1, 30, -1, 32, 33, 34, 35, 36, 37, 38, 39, 6, -1, 8, -1, -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, 23, 24, 25, -1, 27, -1, -1, - 30, -1, 32, 33, 34, 35, 36, 37, 38, 39, - 6, -1, 8, -1, -1, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, 23, 24, 25, - -1, 27, -1, -1, 30, -1, 32, 33, 34, 35, - 36, 37, 38, 6, -1, 8, 9, -1, 11, 12, - -1, 14, 15, 16, 17, -1, 19, -1, -1, -1, - 23, 24, 25, -1, 27, -1, 29, 30, -1, 32, - 33, -1, 35, 36, 37, 38, 6, -1, 8, 9, - -1, 11, 12, -1, 14, 15, 16, 17, -1, 19, - -1, -1, -1, 23, 24, 25, -1, 27, -1, 29, - 30, -1, 32, 33, -1, 35, 36, 37, 38, 6, + 30, -1, 32, 33, 34, 35, 36, 37, 38, 6, -1, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, 19, -1, -1, -1, 23, 24, 25, -1, 27, -1, 29, 30, -1, 32, 33, -1, 35, 36, - 37, 38, 6, 7, 8, -1, -1, 11, 12, -1, + 37, 38, 6, -1, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, 19, -1, -1, -1, 23, - 24, 25, -1, 27, -1, -1, 30, -1, 32, 33, - -1, 35, 36, 37, 38, 6, -1, 8, -1, -1, - 11, 12, -1, 14, 15, 16, 17, -1, 19, 20, - -1, -1, 23, 24, 25, -1, 27, -1, -1, 30, - -1, 32, 33, -1, 35, 36, 37, 38, 6, -1, - 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, + 24, 25, -1, 27, -1, 29, 30, -1, 32, 33, + -1, 35, 36, 37, 38, 6, -1, 8, 9, -1, + 11, 12, -1, 14, 15, 16, 17, -1, 19, -1, + -1, -1, 23, 24, 25, -1, 27, -1, 29, 30, + -1, 32, 33, -1, 35, 36, 37, 38, 6, 7, + 8, -1, -1, 11, 12, -1, 14, 15, 16, 17, -1, 19, -1, -1, -1, 23, 24, 25, -1, 27, -1, -1, 30, -1, 32, 33, -1, 35, 36, 37, 38, 6, -1, 8, -1, -1, 11, 12, -1, 14, - 15, 16, 17, -1, 19, -1, -1, -1, 23, 24, - 25, -1, 27, -1, -1, 30, 31, 32, 33, -1, - 35, 36, 37, 38, 6, -1, 8, -1, -1, 11, + 15, 16, 17, -1, 19, 20, -1, -1, 23, 24, + 25, -1, 27, -1, -1, 30, -1, 32, 33, -1, + 35, 36, 37, 38, 6, -1, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, 19, -1, -1, -1, 23, 24, 25, -1, 27, -1, -1, 30, -1, 32, 33, -1, 35, 36, 37, 38, 6, -1, 8, -1, -1, 11, 12, -1, 14, 15, 16, 17, -1, - 19, -1, -1, -1, 23, 24, -1, -1, 27, -1, - -1, 30, -1, 32, 33, -1, 35, 36, 37, 38, - 6, -1, 8, -1, -1, 11, -1, -1, 14, 15, - 16, 17, -1, 19, -1, -1, -1, 23, -1, 25, + 19, -1, -1, -1, 23, 24, 25, -1, 27, -1, + -1, 30, 31, 32, 33, -1, 35, 36, 37, 38, + 6, -1, 8, -1, -1, 11, 12, -1, 14, 15, + 16, 17, -1, 19, -1, -1, -1, 23, 24, 25, -1, 27, -1, -1, 30, -1, 32, 33, -1, 35, - -1, 37, 38 + 36, 37, 38, 6, -1, 8, -1, -1, 11, 12, + -1, 14, 15, 16, 17, -1, 19, -1, -1, -1, + 23, 24, -1, -1, 27, -1, -1, 30, -1, 32, + 33, -1, 35, 36, 37, 38, 6, -1, 8, -1, + -1, 11, -1, -1, 14, 15, 16, 17, -1, 19, + -1, -1, -1, 23, -1, 25, -1, 27, -1, -1, + 30, -1, 32, 33, -1, 35, -1, 37, 38 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1164,7 +1172,8 @@ static const yytype_int8 yystos[] = 87, 31, 25, 29, 29, 77, 5, 80, 29, 105, 80, 28, 62, 29, 72, 80, 29, 76, 80, 5, 10, 52, 80, 117, 87, 104, 5, 5, 61, 62, - 21, 61, 26, 52, 5, 61, 80, 77, 87, 77 + 21, 61, 77, 26, 52, 5, 61, 80, 77, 87, + 77 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -1196,7 +1205,7 @@ static const yytype_int8 yyr2[] = { 0, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 5, 3, 2, 1, 1, 1, 0, 1, 0, - 3, 1, 2, 5, 0, 2, 1, 2, 1, 1, + 3, 1, 2, 6, 0, 2, 1, 2, 1, 1, 1, 3, 0, 1, 6, 4, 0, 3, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 1, @@ -1909,7 +1918,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); case 2: /* start: document */ #line 103 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ivar_set(parser, rb_intern("@result"), yyvsp[0]); } -#line 1913 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1922 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 3: /* document: definitions_list */ @@ -1926,19 +1935,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } yyval = MAKE_AST_NODE(Document, 3, line, col, yyvsp[0]); } -#line 1930 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1939 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 4: /* definitions_list: definition */ #line 119 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 1936 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1945 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 5: /* definitions_list: definitions_list definition */ #line 120 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 1942 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1951 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 11: /* operation_definition: operation_type operation_name_opt variable_definitions_opt directives_list_opt selection_set */ @@ -1954,7 +1963,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 1958 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1967 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 12: /* operation_definition: LCURLY selection_list RCURLY */ @@ -1970,7 +1979,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 1974 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1983 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 13: /* operation_definition: LCURLY RCURLY */ @@ -1986,91 +1995,92 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); GraphQL_Language_Nodes_NONE ); } -#line 1990 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 1999 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 17: /* operation_name_opt: %empty */ #line 172 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qnil; } -#line 1996 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2005 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 19: /* variable_definitions_opt: %empty */ #line 176 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2002 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2011 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 20: /* variable_definitions_opt: LPAREN variable_definitions_list RPAREN */ #line 177 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2008 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2017 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 21: /* variable_definitions_list: variable_definition */ #line 180 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2014 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2023 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 22: /* variable_definitions_list: variable_definitions_list variable_definition */ #line 181 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2020 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2029 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; - case 23: /* variable_definition: VAR_SIGN name COLON type default_value_opt */ + case 23: /* variable_definition: VAR_SIGN name COLON type default_value_opt directives_list_opt */ #line 184 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" - { - yyval = MAKE_AST_NODE(VariableDefinition, 5, - rb_ary_entry(yyvsp[-4], 1), - rb_ary_entry(yyvsp[-4], 2), - rb_ary_entry(yyvsp[-3], 3), + { + yyval = MAKE_AST_NODE(VariableDefinition, 6, + rb_ary_entry(yyvsp[-5], 1), + rb_ary_entry(yyvsp[-5], 2), + rb_ary_entry(yyvsp[-4], 3), + yyvsp[-2], yyvsp[-1], yyvsp[0] ); } -#line 2034 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2044 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 24: /* default_value_opt: %empty */ -#line 195 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 196 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qnil; } -#line 2040 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2050 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 25: /* default_value_opt: EQUALS literal_value */ -#line 196 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 197 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[0]; } -#line 2046 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2056 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 26: /* selection_list: selection */ -#line 199 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 200 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2052 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2062 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 27: /* selection_list: selection_list selection */ -#line 200 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 201 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2058 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2068 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 31: /* selection_set: LCURLY selection_list RCURLY */ -#line 208 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 209 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2064 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2074 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 32: /* selection_set_opt: %empty */ -#line 211 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 212 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new(); } -#line 2070 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2080 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 34: /* field: name COLON name arguments_opt directives_list_opt selection_set_opt */ -#line 215 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 216 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Field, 7, rb_ary_entry(yyvsp[-5], 1), @@ -2082,11 +2092,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] // subselections ); } -#line 2086 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2096 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 35: /* field: name arguments_opt directives_list_opt selection_set_opt */ -#line 226 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 227 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Field, 7, rb_ary_entry(yyvsp[-3], 1), @@ -2098,35 +2108,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] // subselections ); } -#line 2102 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2112 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 36: /* arguments_opt: %empty */ -#line 239 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 240 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2108 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2118 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 37: /* arguments_opt: LPAREN arguments_list RPAREN */ -#line 240 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 241 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2114 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2124 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 38: /* arguments_list: argument */ -#line 243 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 244 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2120 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2130 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 39: /* arguments_list: arguments_list argument */ -#line 244 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 245 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2126 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2136 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 40: /* argument: name COLON input_value */ -#line 247 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 248 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Argument, 4, rb_ary_entry(yyvsp[-2], 1), @@ -2135,41 +2145,41 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2139 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2149 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 41: /* literal_value: FLOAT */ -#line 257 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 258 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_funcall(rb_ary_entry(yyvsp[0], 3), rb_intern("to_f"), 0); } -#line 2145 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2155 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 42: /* literal_value: INT */ -#line 258 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 259 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_funcall(rb_ary_entry(yyvsp[0], 3), rb_intern("to_i"), 0); } -#line 2151 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2161 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 43: /* literal_value: STRING */ -#line 259 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 260 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_entry(yyvsp[0], 3); } -#line 2157 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2167 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 44: /* literal_value: TRUE_LITERAL */ -#line 260 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 261 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qtrue; } -#line 2163 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2173 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 45: /* literal_value: FALSE_LITERAL */ -#line 261 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 262 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qfalse; } -#line 2169 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2179 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 53: /* null_value: NULL_LITERAL */ -#line 272 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 273 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(NullValue, 3, rb_ary_entry(yyvsp[0], 1), @@ -2177,11 +2187,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); rb_ary_entry(yyvsp[0], 3) ); } -#line 2181 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2191 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 54: /* variable: VAR_SIGN name */ -#line 280 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 281 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(VariableIdentifier, 3, rb_ary_entry(yyvsp[-1], 1), @@ -2189,35 +2199,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); rb_ary_entry(yyvsp[0], 3) ); } -#line 2193 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2203 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 55: /* list_value: LBRACKET RBRACKET */ -#line 289 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 290 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2199 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2209 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 56: /* list_value: LBRACKET list_value_list RBRACKET */ -#line 290 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 291 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2205 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2215 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 57: /* list_value_list: input_value */ -#line 293 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 294 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2211 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2221 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 58: /* list_value_list: list_value_list input_value */ -#line 294 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 295 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2217 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2227 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 63: /* enum_value: enum_name */ -#line 302 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 303 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Enum, 3, rb_ary_entry(yyvsp[0], 1), @@ -2225,11 +2235,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); rb_ary_entry(yyvsp[0], 3) ); } -#line 2229 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2239 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 64: /* object_value: LCURLY object_value_list_opt RCURLY */ -#line 311 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 312 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InputObject, 3, rb_ary_entry(yyvsp[-2], 1), @@ -2237,29 +2247,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2241 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2251 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 65: /* object_value_list_opt: %empty */ -#line 320 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 321 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2247 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2257 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 67: /* object_value_list: object_value_field */ -#line 324 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 325 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2253 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2263 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 68: /* object_value_list: object_value_list object_value_field */ -#line 325 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 326 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2259 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2269 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 69: /* object_value_field: name COLON input_value */ -#line 328 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 329 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Argument, 4, rb_ary_entry(yyvsp[-2], 1), @@ -2268,11 +2278,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2272 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2282 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 70: /* object_literal_value: LCURLY object_literal_value_list_opt RCURLY */ -#line 339 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 340 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InputObject, 3, rb_ary_entry(yyvsp[-2], 1), @@ -2280,29 +2290,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2284 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2294 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 71: /* object_literal_value_list_opt: %empty */ -#line 348 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 349 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2290 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2300 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 73: /* object_literal_value_list: object_literal_value_field */ -#line 352 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 353 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2296 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2306 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 74: /* object_literal_value_list: object_literal_value_list object_literal_value_field */ -#line 353 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 354 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2302 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2312 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 75: /* object_literal_value_field: name COLON literal_value */ -#line 356 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 357 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Argument, 4, rb_ary_entry(yyvsp[-2], 1), @@ -2311,29 +2321,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2315 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2325 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 76: /* directives_list_opt: %empty */ -#line 367 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 368 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2321 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2331 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 78: /* directives_list: directive */ -#line 371 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 372 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2327 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2337 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 79: /* directives_list: directives_list directive */ -#line 372 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 373 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2333 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2343 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 80: /* directive: DIR_SIGN name arguments_opt */ -#line 374 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 375 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(Directive, 4, rb_ary_entry(yyvsp[-2], 1), @@ -2342,11 +2352,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2346 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2356 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 101: /* fragment_spread: ELLIPSIS name_without_on directives_list_opt */ -#line 411 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 412 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(FragmentSpread, 4, rb_ary_entry(yyvsp[-2], 1), @@ -2355,11 +2365,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2359 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2369 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 102: /* inline_fragment: ELLIPSIS ON type directives_list_opt selection_set */ -#line 421 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 422 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InlineFragment, 5, rb_ary_entry(yyvsp[-4], 1), @@ -2369,11 +2379,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2373 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2383 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 103: /* inline_fragment: ELLIPSIS directives_list_opt selection_set */ -#line 430 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 431 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InlineFragment, 5, rb_ary_entry(yyvsp[-2], 1), @@ -2383,11 +2393,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2387 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2397 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 104: /* fragment_definition: FRAGMENT fragment_name_opt ON type directives_list_opt selection_set */ -#line 441 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 442 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(FragmentDefinition, 6, rb_ary_entry(yyvsp[-5], 1), @@ -2398,29 +2408,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2402 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2412 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 105: /* fragment_name_opt: %empty */ -#line 453 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 454 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qnil; } -#line 2408 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2418 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 106: /* fragment_name_opt: name_without_on */ -#line 454 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 455 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_entry(yyvsp[0], 3); } -#line 2414 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2424 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 108: /* type: nullable_type BANG */ -#line 458 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 459 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(NonNullType, 3, rb_funcall(yyvsp[-1], rb_intern("line"), 0), rb_funcall(yyvsp[-1], rb_intern("col"), 0), yyvsp[-1]); } -#line 2420 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2430 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 109: /* nullable_type: name */ -#line 461 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 462 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), @@ -2428,11 +2438,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); rb_ary_entry(yyvsp[0], 3) ); } -#line 2432 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2442 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 110: /* nullable_type: LBRACKET type RBRACKET */ -#line 468 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 469 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(ListType, 3, rb_funcall(yyvsp[-1], rb_intern("line"), 0), @@ -2440,11 +2450,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2444 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2454 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 114: /* schema_definition: SCHEMA directives_list_opt operation_type_definition_list_opt */ -#line 482 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 483 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(SchemaDefinition, 6, rb_ary_entry(yyvsp[-2], 1), @@ -2456,54 +2466,54 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2460 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2470 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 115: /* operation_type_definition_list_opt: %empty */ -#line 495 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 496 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_hash_new(); } -#line 2466 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2476 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 116: /* operation_type_definition_list_opt: LCURLY operation_type_definition_list RCURLY */ -#line 496 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 497 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2472 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2482 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 117: /* operation_type_definition_list: operation_type_definition */ -#line 499 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 500 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_hash_new(); rb_hash_aset(yyval, rb_ary_entry(yyvsp[0], 0), rb_ary_entry(yyvsp[0], 1)); } -#line 2481 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2491 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 118: /* operation_type_definition_list: operation_type_definition_list operation_type_definition */ -#line 503 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 504 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_hash_aset(yyval, rb_ary_entry(yyvsp[0], 0), rb_ary_entry(yyvsp[0], 1)); } -#line 2489 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2499 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 119: /* operation_type_definition: operation_type COLON name */ -#line 508 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 509 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(2, rb_ary_entry(yyvsp[-2], 3), rb_ary_entry(yyvsp[0], 3)); } -#line 2497 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2507 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 127: /* description_opt: %empty */ -#line 523 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 524 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qnil; } -#line 2503 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2513 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 129: /* scalar_type_definition: description_opt SCALAR name directives_list_opt */ -#line 527 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 528 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(ScalarTypeDefinition, 5, rb_ary_entry(yyvsp[-2], 1), @@ -2514,11 +2524,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2518 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2528 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 130: /* object_type_definition: description_opt TYPE_LITERAL name implements_opt directives_list_opt field_definition_list_opt */ -#line 539 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 540 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(ObjectTypeDefinition, 7, rb_ary_entry(yyvsp[-4], 1), @@ -2531,35 +2541,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2535 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2545 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 131: /* implements_opt: %empty */ -#line 553 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 554 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2541 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2551 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 132: /* implements_opt: IMPLEMENTS AMP interfaces_list */ -#line 554 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 555 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[0]; } -#line 2547 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2557 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 133: /* implements_opt: IMPLEMENTS interfaces_list */ -#line 555 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 556 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[0]; } -#line 2553 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2563 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 134: /* implements_opt: IMPLEMENTS legacy_interfaces_list */ -#line 556 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 557 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[0]; } -#line 2559 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2569 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 135: /* interfaces_list: name */ -#line 559 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 560 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { VALUE new_name = MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), @@ -2568,20 +2578,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); ); yyval = rb_ary_new_from_args(1, new_name); } -#line 2572 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2582 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 136: /* interfaces_list: interfaces_list AMP name */ -#line 567 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 568 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { VALUE new_name = MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), rb_ary_entry(yyvsp[0], 2), rb_ary_entry(yyvsp[0], 3)); rb_ary_push(yyval, new_name); } -#line 2581 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2591 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 137: /* legacy_interfaces_list: name */ -#line 573 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 574 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { VALUE new_name = MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), @@ -2590,19 +2600,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); ); yyval = rb_ary_new_from_args(1, new_name); } -#line 2594 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2604 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 138: /* legacy_interfaces_list: legacy_interfaces_list name */ -#line 581 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 582 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), rb_ary_entry(yyvsp[0], 2), rb_ary_entry(yyvsp[0], 3))); } -#line 2602 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2612 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 139: /* input_value_definition: description_opt name COLON type default_value_opt directives_list_opt */ -#line 586 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 587 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InputValueDefinition, 7, rb_ary_entry(yyvsp[-4], 1), @@ -2615,35 +2625,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2619 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2629 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 140: /* input_value_definition_list: input_value_definition */ -#line 600 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 601 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2625 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2635 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 141: /* input_value_definition_list: input_value_definition_list input_value_definition */ -#line 601 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 602 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2631 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2641 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 142: /* arguments_definitions_opt: %empty */ -#line 604 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 605 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2637 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2647 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 143: /* arguments_definitions_opt: LPAREN input_value_definition_list RPAREN */ -#line 605 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 606 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2643 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2653 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 144: /* field_definition: description_opt name arguments_definitions_opt COLON type directives_list_opt */ -#line 608 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 609 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(FieldDefinition, 7, rb_ary_entry(yyvsp[-4], 1), @@ -2656,41 +2666,41 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2660 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2670 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 145: /* field_definition_list_opt: %empty */ -#line 622 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 623 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2666 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2676 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 146: /* field_definition_list_opt: LCURLY field_definition_list RCURLY */ -#line 623 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 624 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = yyvsp[-1]; } -#line 2672 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2682 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 147: /* field_definition_list: %empty */ -#line 626 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 627 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = GraphQL_Language_Nodes_NONE; } -#line 2678 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2688 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 148: /* field_definition_list: field_definition */ -#line 627 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 628 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2684 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2694 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 149: /* field_definition_list: field_definition_list field_definition */ -#line 628 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 629 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2690 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2700 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 150: /* interface_type_definition: description_opt INTERFACE name implements_opt directives_list_opt field_definition_list_opt */ -#line 631 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 632 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InterfaceTypeDefinition, 7, rb_ary_entry(yyvsp[-4], 1), @@ -2703,11 +2713,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2707 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2717 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 151: /* union_members: name */ -#line 645 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 646 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { VALUE new_member = MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), @@ -2716,19 +2726,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); ); yyval = rb_ary_new_from_args(1, new_member); } -#line 2720 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2730 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 152: /* union_members: union_members PIPE name */ -#line 653 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 654 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, MAKE_AST_NODE(TypeName, 3, rb_ary_entry(yyvsp[0], 1), rb_ary_entry(yyvsp[0], 2), rb_ary_entry(yyvsp[0], 3))); } -#line 2728 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2738 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 153: /* union_type_definition: description_opt UNION name directives_list_opt EQUALS union_members */ -#line 658 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 659 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(UnionTypeDefinition, 6, rb_ary_entry(yyvsp[-4], 1), @@ -2740,11 +2750,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-2] ); } -#line 2744 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2754 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 154: /* enum_type_definition: description_opt ENUM name directives_list_opt LCURLY enum_value_definitions RCURLY */ -#line 671 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 672 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(EnumTypeDefinition, 6, rb_ary_entry(yyvsp[-5], 1), @@ -2756,11 +2766,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2760 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2770 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 155: /* enum_value_definition: description_opt enum_name directives_list_opt */ -#line 684 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 685 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(EnumValueDefinition, 5, rb_ary_entry(yyvsp[-1], 1), @@ -2771,23 +2781,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2775 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2785 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 156: /* enum_value_definitions: enum_value_definition */ -#line 696 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 697 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, yyvsp[0]); } -#line 2781 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2791 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 157: /* enum_value_definitions: enum_value_definitions enum_value_definition */ -#line 697 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 698 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, yyvsp[0]); } -#line 2787 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2797 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 158: /* input_object_type_definition: description_opt INPUT name directives_list_opt LCURLY input_value_definition_list RCURLY */ -#line 700 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 701 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InputObjectTypeDefinition, 6, rb_ary_entry(yyvsp[-5], 1), @@ -2799,11 +2809,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2803 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2813 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 159: /* directive_definition: description_opt DIRECTIVE DIR_SIGN name arguments_definitions_opt directive_repeatable_opt ON directive_locations */ -#line 713 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 714 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(DirectiveDefinition, 7, rb_ary_entry(yyvsp[-6], 1), @@ -2816,35 +2826,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2820 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2830 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 160: /* directive_repeatable_opt: %empty */ -#line 727 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 728 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qnil; } -#line 2826 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2836 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 161: /* directive_repeatable_opt: REPEATABLE */ -#line 728 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 729 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = Qtrue; } -#line 2832 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2842 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 162: /* directive_locations: name */ -#line 731 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 732 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = rb_ary_new_from_args(1, MAKE_AST_NODE(DirectiveLocation, 3, rb_ary_entry(yyvsp[0], 1), rb_ary_entry(yyvsp[0], 2), rb_ary_entry(yyvsp[0], 3))); } -#line 2838 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2848 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 163: /* directive_locations: directive_locations PIPE name */ -#line 732 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 733 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { rb_ary_push(yyval, MAKE_AST_NODE(DirectiveLocation, 3, rb_ary_entry(yyvsp[0], 1), rb_ary_entry(yyvsp[0], 2), rb_ary_entry(yyvsp[0], 3))); } -#line 2844 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2854 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 166: /* schema_extension: EXTEND SCHEMA directives_list_opt LCURLY operation_type_definition_list RCURLY */ -#line 740 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 741 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(SchemaExtension, 6, rb_ary_entry(yyvsp[-5], 1), @@ -2856,11 +2866,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-3] ); } -#line 2860 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2870 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 167: /* schema_extension: EXTEND SCHEMA directives_list */ -#line 751 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 752 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(SchemaExtension, 6, rb_ary_entry(yyvsp[-2], 1), @@ -2871,11 +2881,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2875 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2885 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 174: /* scalar_type_extension: EXTEND SCALAR name directives_list */ -#line 770 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 771 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(ScalarTypeExtension, 4, rb_ary_entry(yyvsp[-3], 1), @@ -2884,11 +2894,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2888 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2898 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 175: /* object_type_extension: EXTEND TYPE_LITERAL name implements_opt directives_list_opt field_definition_list_opt */ -#line 780 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 781 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(ObjectTypeExtension, 6, rb_ary_entry(yyvsp[-5], 1), @@ -2899,11 +2909,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2903 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2913 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 176: /* interface_type_extension: EXTEND INTERFACE name implements_opt directives_list_opt field_definition_list_opt */ -#line 792 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 793 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InterfaceTypeExtension, 6, rb_ary_entry(yyvsp[-5], 1), @@ -2914,11 +2924,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2918 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2928 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 177: /* union_type_extension: EXTEND UNION name directives_list_opt EQUALS union_members */ -#line 804 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 805 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(UnionTypeExtension, 5, rb_ary_entry(yyvsp[-5], 1), @@ -2928,11 +2938,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-2] ); } -#line 2932 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2942 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 178: /* union_type_extension: EXTEND UNION name directives_list */ -#line 813 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 814 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(UnionTypeExtension, 5, rb_ary_entry(yyvsp[-3], 1), @@ -2942,11 +2952,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[0] ); } -#line 2946 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2956 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 179: /* enum_type_extension: EXTEND ENUM name directives_list_opt LCURLY enum_value_definitions RCURLY */ -#line 824 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 825 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(EnumTypeExtension, 5, rb_ary_entry(yyvsp[-6], 1), @@ -2956,11 +2966,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2960 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2970 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 180: /* enum_type_extension: EXTEND ENUM name directives_list */ -#line 833 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 834 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(EnumTypeExtension, 5, rb_ary_entry(yyvsp[-3], 1), @@ -2970,11 +2980,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); GraphQL_Language_Nodes_NONE ); } -#line 2974 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2984 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 181: /* input_object_type_extension: EXTEND INPUT name directives_list_opt LCURLY input_value_definition_list RCURLY */ -#line 844 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 845 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InputObjectTypeExtension, 5, rb_ary_entry(yyvsp[-6], 1), @@ -2984,11 +2994,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp[-1] ); } -#line 2988 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 2998 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; case 182: /* input_object_type_extension: EXTEND INPUT name directives_list */ -#line 853 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 854 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" { yyval = MAKE_AST_NODE(InputObjectTypeExtension, 5, rb_ary_entry(yyvsp[-3], 1), @@ -2998,11 +3008,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); GraphQL_Language_Nodes_NONE ); } -#line 3002 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 3012 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" break; -#line 3006 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" +#line 3016 "graphql-c_parser/ext/graphql_c_parser_ext/parser.c" default: break; } @@ -3226,7 +3236,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); return yyresult; } -#line 863 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" +#line 864 "graphql-c_parser/ext/graphql_c_parser_ext/parser.y" // Custom functions diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/parser.y b/graphql-c_parser/ext/graphql_c_parser_ext/parser.y index cce8e506b3..95689a915a 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/parser.y +++ b/graphql-c_parser/ext/graphql_c_parser_ext/parser.y @@ -181,13 +181,14 @@ SETUP_NODE_CLASS_VARIABLE(SchemaExtension) | variable_definitions_list variable_definition { rb_ary_push($$, $2); } variable_definition: - VAR_SIGN name COLON type default_value_opt { - $$ = MAKE_AST_NODE(VariableDefinition, 5, + VAR_SIGN name COLON type default_value_opt directives_list_opt { + $$ = MAKE_AST_NODE(VariableDefinition, 6, rb_ary_entry($1, 1), rb_ary_entry($1, 2), rb_ary_entry($2, 3), $4, - $5 + $5, + $6 ); }