@@ -34,7 +34,7 @@ void JsonVisitor::startPrintingNode(const char *kind, const yy::location &locati
34
34
return ;
35
35
}
36
36
37
- void JsonVisitor::printChildArray (
37
+ void JsonVisitor::printChildList (
38
38
const std::vector<std::string>::const_iterator &childIterator,
39
39
size_t numChildren) {
40
40
out_ << ' [' ;
@@ -66,7 +66,7 @@ void JsonVisitor::endVisitDocument(const Document &document) {
66
66
out_ << " \" definitions\" :" ;
67
67
68
68
const auto &children = printed_.back ();
69
- printChildArray (children.begin (), children.size ());
69
+ printChildList (children.begin (), children.size ());
70
70
out_ << ' }' ;
71
71
printed_.pop_back ();
72
72
assert (printed_.empty ());
@@ -93,7 +93,7 @@ void JsonVisitor::endVisitOperationDefinition(const OperationDefinition &operati
93
93
out_ << " ,\" variableDefinitions\" :" ;
94
94
const auto *variableDefinitions = operationDefinition.getVariableDefinitions ();
95
95
if (variableDefinitions != nullptr ) {
96
- printChildArray (nextChild, variableDefinitions->size ());
96
+ printChildList (nextChild, variableDefinitions->size ());
97
97
nextChild += variableDefinitions->size ();
98
98
} else {
99
99
out_ << " null" ;
@@ -102,7 +102,7 @@ void JsonVisitor::endVisitOperationDefinition(const OperationDefinition &operati
102
102
out_ << " ,\" directives\" :" ;
103
103
const auto *directives = operationDefinition.getDirectives ();
104
104
if (directives != nullptr ) {
105
- printChildArray (nextChild, directives->size ());
105
+ printChildList (nextChild, directives->size ());
106
106
nextChild += directives->size ();
107
107
} else {
108
108
out_ << " null" ;
@@ -152,7 +152,7 @@ void JsonVisitor::endVisitSelectionSet(const SelectionSet &selectionSet) {
152
152
out_ << " \" selections\" :" ;
153
153
154
154
const auto &children = printed_.back ();
155
- printChildArray (children.begin (), children.size ());
155
+ printChildList (children.begin (), children.size ());
156
156
157
157
out_ << ' }' ;
158
158
@@ -182,7 +182,7 @@ void JsonVisitor::endVisitField(const Field &field) {
182
182
out_ << " ,\" arguments\" :" ;
183
183
const auto *arguments = field.getArguments ();
184
184
if (arguments != nullptr ) {
185
- printChildArray (nextChild, arguments->size ());
185
+ printChildList (nextChild, arguments->size ());
186
186
nextChild += arguments->size ();
187
187
} else {
188
188
out_ << " null" ;
@@ -191,7 +191,7 @@ void JsonVisitor::endVisitField(const Field &field) {
191
191
out_ << " ,\" directives\" :" ;
192
192
const auto *directives = field.getDirectives ();
193
193
if (directives != nullptr ) {
194
- printChildArray (nextChild, directives->size ());
194
+ printChildList (nextChild, directives->size ());
195
195
nextChild += directives->size ();
196
196
} else {
197
197
out_ << " null" ;
@@ -239,7 +239,7 @@ void JsonVisitor::endVisitFragmentSpread(const FragmentSpread &fragmentSpread) {
239
239
out_ << " ,\" directives\" :" ;
240
240
const auto *directives = fragmentSpread.getDirectives ();
241
241
if (directives != nullptr ) {
242
- printChildArray (children.begin () + 1 , directives->size ());
242
+ printChildList (children.begin () + 1 , directives->size ());
243
243
} else {
244
244
out_ << " null" ;
245
245
}
@@ -267,7 +267,7 @@ void JsonVisitor::endVisitInlineFragment(const InlineFragment &inlineFragment) {
267
267
out_ << " \" directives\" :" ;
268
268
const auto *directives = inlineFragment.getDirectives ();
269
269
if (directives != nullptr ) {
270
- printChildArray (nextChild, directives->size ());
270
+ printChildList (nextChild, directives->size ());
271
271
nextChild += directives->size ();
272
272
} else {
273
273
out_ << " null" ;
@@ -298,7 +298,7 @@ void JsonVisitor::endVisitFragmentDefinition(const FragmentDefinition &fragmentD
298
298
out_ << " ,\" directives\" :" ;
299
299
const auto *directives = fragmentDefinition.getDirectives ();
300
300
if (directives != nullptr ) {
301
- printChildArray (nextChild, directives->size ());
301
+ printChildList (nextChild, directives->size ());
302
302
nextChild += directives->size ();
303
303
} else {
304
304
out_ << " null" ;
@@ -355,16 +355,16 @@ void JsonVisitor::endVisitBooleanValue(const BooleanValue &booleanValue) {
355
355
printed_.back ().emplace_back (out_.str ());
356
356
}
357
357
358
- bool JsonVisitor::visitArrayValue (const ArrayValue &arrayValue) {
358
+ bool JsonVisitor::visitListValue (const ListValue &arrayValue) {
359
359
visitNode ();
360
360
return true ;
361
361
}
362
362
363
- void JsonVisitor::endVisitArrayValue (const ArrayValue &arrayValue) {
364
- startPrintingNode (" ArrayValue " , arrayValue.getLocation ());
363
+ void JsonVisitor::endVisitListValue (const ListValue &arrayValue) {
364
+ startPrintingNode (" ListValue " , arrayValue.getLocation ());
365
365
366
366
out_ << " \" values\" :" ;
367
- printChildArray (printed_.back ().begin (), arrayValue.getValues ().size ());
367
+ printChildList (printed_.back ().begin (), arrayValue.getValues ().size ());
368
368
369
369
out_ << ' }' ;
370
370
@@ -380,7 +380,7 @@ void JsonVisitor::endVisitObjectValue(const ObjectValue &objectValue) {
380
380
startPrintingNode (" ObjectValue" , objectValue.getLocation ());
381
381
382
382
out_ << " \" fields\" :" ;
383
- printChildArray (printed_.back ().begin (), objectValue.getFields ().size ());
383
+ printChildList (printed_.back ().begin (), objectValue.getFields ().size ());
384
384
385
385
out_ << ' }' ;
386
386
@@ -419,7 +419,7 @@ void JsonVisitor::endVisitDirective(const Directive &directive) {
419
419
out_ << " ,\" arguments\" :" ;
420
420
const auto *arguments = directive.getArguments ();
421
421
if (arguments != nullptr ) {
422
- printChildArray (nextChild, arguments->size ());
422
+ printChildList (nextChild, arguments->size ());
423
423
} else {
424
424
out_ << " null" ;
425
425
}
0 commit comments