@@ -34,7 +34,7 @@ void JsonVisitor::startPrintingNode(const char *kind, const yy::location &locati
3434 return ;
3535}
3636
37- void JsonVisitor::printChildArray (
37+ void JsonVisitor::printChildList (
3838 const std::vector<std::string>::const_iterator &childIterator,
3939 size_t numChildren) {
4040 out_ << ' [' ;
@@ -66,7 +66,7 @@ void JsonVisitor::endVisitDocument(const Document &document) {
6666 out_ << " \" definitions\" :" ;
6767
6868 const auto &children = printed_.back ();
69- printChildArray (children.begin (), children.size ());
69+ printChildList (children.begin (), children.size ());
7070 out_ << ' }' ;
7171 printed_.pop_back ();
7272 assert (printed_.empty ());
@@ -93,7 +93,7 @@ void JsonVisitor::endVisitOperationDefinition(const OperationDefinition &operati
9393 out_ << " ,\" variableDefinitions\" :" ;
9494 const auto *variableDefinitions = operationDefinition.getVariableDefinitions ();
9595 if (variableDefinitions != nullptr ) {
96- printChildArray (nextChild, variableDefinitions->size ());
96+ printChildList (nextChild, variableDefinitions->size ());
9797 nextChild += variableDefinitions->size ();
9898 } else {
9999 out_ << " null" ;
@@ -102,7 +102,7 @@ void JsonVisitor::endVisitOperationDefinition(const OperationDefinition &operati
102102 out_ << " ,\" directives\" :" ;
103103 const auto *directives = operationDefinition.getDirectives ();
104104 if (directives != nullptr ) {
105- printChildArray (nextChild, directives->size ());
105+ printChildList (nextChild, directives->size ());
106106 nextChild += directives->size ();
107107 } else {
108108 out_ << " null" ;
@@ -152,7 +152,7 @@ void JsonVisitor::endVisitSelectionSet(const SelectionSet &selectionSet) {
152152 out_ << " \" selections\" :" ;
153153
154154 const auto &children = printed_.back ();
155- printChildArray (children.begin (), children.size ());
155+ printChildList (children.begin (), children.size ());
156156
157157 out_ << ' }' ;
158158
@@ -182,7 +182,7 @@ void JsonVisitor::endVisitField(const Field &field) {
182182 out_ << " ,\" arguments\" :" ;
183183 const auto *arguments = field.getArguments ();
184184 if (arguments != nullptr ) {
185- printChildArray (nextChild, arguments->size ());
185+ printChildList (nextChild, arguments->size ());
186186 nextChild += arguments->size ();
187187 } else {
188188 out_ << " null" ;
@@ -191,7 +191,7 @@ void JsonVisitor::endVisitField(const Field &field) {
191191 out_ << " ,\" directives\" :" ;
192192 const auto *directives = field.getDirectives ();
193193 if (directives != nullptr ) {
194- printChildArray (nextChild, directives->size ());
194+ printChildList (nextChild, directives->size ());
195195 nextChild += directives->size ();
196196 } else {
197197 out_ << " null" ;
@@ -239,7 +239,7 @@ void JsonVisitor::endVisitFragmentSpread(const FragmentSpread &fragmentSpread) {
239239 out_ << " ,\" directives\" :" ;
240240 const auto *directives = fragmentSpread.getDirectives ();
241241 if (directives != nullptr ) {
242- printChildArray (children.begin () + 1 , directives->size ());
242+ printChildList (children.begin () + 1 , directives->size ());
243243 } else {
244244 out_ << " null" ;
245245 }
@@ -267,7 +267,7 @@ void JsonVisitor::endVisitInlineFragment(const InlineFragment &inlineFragment) {
267267 out_ << " \" directives\" :" ;
268268 const auto *directives = inlineFragment.getDirectives ();
269269 if (directives != nullptr ) {
270- printChildArray (nextChild, directives->size ());
270+ printChildList (nextChild, directives->size ());
271271 nextChild += directives->size ();
272272 } else {
273273 out_ << " null" ;
@@ -298,7 +298,7 @@ void JsonVisitor::endVisitFragmentDefinition(const FragmentDefinition &fragmentD
298298 out_ << " ,\" directives\" :" ;
299299 const auto *directives = fragmentDefinition.getDirectives ();
300300 if (directives != nullptr ) {
301- printChildArray (nextChild, directives->size ());
301+ printChildList (nextChild, directives->size ());
302302 nextChild += directives->size ();
303303 } else {
304304 out_ << " null" ;
@@ -355,16 +355,16 @@ void JsonVisitor::endVisitBooleanValue(const BooleanValue &booleanValue) {
355355 printed_.back ().emplace_back (out_.str ());
356356}
357357
358- bool JsonVisitor::visitArrayValue (const ArrayValue &arrayValue) {
358+ bool JsonVisitor::visitListValue (const ListValue &arrayValue) {
359359 visitNode ();
360360 return true ;
361361}
362362
363- void JsonVisitor::endVisitArrayValue (const ArrayValue &arrayValue) {
364- startPrintingNode (" ArrayValue " , arrayValue.getLocation ());
363+ void JsonVisitor::endVisitListValue (const ListValue &arrayValue) {
364+ startPrintingNode (" ListValue " , arrayValue.getLocation ());
365365
366366 out_ << " \" values\" :" ;
367- printChildArray (printed_.back ().begin (), arrayValue.getValues ().size ());
367+ printChildList (printed_.back ().begin (), arrayValue.getValues ().size ());
368368
369369 out_ << ' }' ;
370370
@@ -380,7 +380,7 @@ void JsonVisitor::endVisitObjectValue(const ObjectValue &objectValue) {
380380 startPrintingNode (" ObjectValue" , objectValue.getLocation ());
381381
382382 out_ << " \" fields\" :" ;
383- printChildArray (printed_.back ().begin (), objectValue.getFields ().size ());
383+ printChildList (printed_.back ().begin (), objectValue.getFields ().size ());
384384
385385 out_ << ' }' ;
386386
@@ -419,7 +419,7 @@ void JsonVisitor::endVisitDirective(const Directive &directive) {
419419 out_ << " ,\" arguments\" :" ;
420420 const auto *arguments = directive.getArguments ();
421421 if (arguments != nullptr ) {
422- printChildArray (nextChild, arguments->size ());
422+ printChildList (nextChild, arguments->size ());
423423 } else {
424424 out_ << " null" ;
425425 }
0 commit comments