lib/graphql/language/parser.y in graphql-1.8.0.pre9 vs lib/graphql/language/parser.y in graphql-1.8.0.pre10

- old
+ new

@@ -151,11 +151,11 @@ | ON | operation_type | schema_keyword enum_value_definition: - enum_name directives_list_opt { return make_node(:EnumValueDefinition, name: val[0], directives: val[1], description: get_description(val[0])) } + enum_name directives_list_opt { return make_node(:EnumValueDefinition, name: val[0], directives: val[1], description: get_description(val[0]), position_source: val[0]) } enum_value_definitions: enum_value_definition { return [val[0]] } | enum_value_definitions enum_value_definition { return val[0] << val[1] } @@ -305,20 +305,20 @@ | IMPLEMENTS AMP interfaces_list { return val[2] } | IMPLEMENTS interfaces_list { return val[1] } | IMPLEMENTS legacy_interfaces_list { return val[1] } interfaces_list: - name { return [make_node(:TypeName, name: val[0])] } - | interfaces_list AMP name { val[0] << make_node(:TypeName, name: val[2]) } + name { return [make_node(:TypeName, name: val[0], position_source: val[0])] } + | interfaces_list AMP name { val[0] << make_node(:TypeName, name: val[2], position_source: val[2]) } legacy_interfaces_list: - name { return [make_node(:TypeName, name: val[0])] } - | legacy_interfaces_list name { val[0] << make_node(:TypeName, name: val[1]) } + name { return [make_node(:TypeName, name: val[0], position_source: val[0])] } + | legacy_interfaces_list name { val[0] << make_node(:TypeName, name: val[1], position_source: val[1]) } input_value_definition: name COLON type default_value_opt directives_list_opt { - return make_node(:InputValueDefinition, name: val[0], type: val[2], default_value: val[3], directives: val[4], description: get_description(val[0])) + return make_node(:InputValueDefinition, name: val[0], type: val[2], default_value: val[3], directives: val[4], description: get_description(val[0]), position_source: val[0]) } input_value_definition_list: input_value_definition { return [val[0]] } | input_value_definition_list input_value_definition { val[0] << val[1] } @@ -327,10 +327,10 @@ /* none */ { return [] } | LPAREN input_value_definition_list RPAREN { return val[1] } field_definition: name arguments_definitions_opt COLON type directives_list_opt { - return make_node(:FieldDefinition, name: val[0], arguments: val[1], type: val[3], directives: val[4], description: get_description(val[0])) + return make_node(:FieldDefinition, name: val[0], arguments: val[1], type: val[3], directives: val[4], description: get_description(val[0]), position_source: val[0]) } field_definition_list: /* none */ { return [] } | field_definition { return [val[0]] }