1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
6 #include "tree/ParseTree.h"
7 #include "Exceptions.h"
9 #include "support/Arrays.h"
11 using namespace antlrcpp;
13 std::string Arrays::listToString(const std::vector<std::string> &list, const std::string &separator)
16 bool firstEntry = true;
19 for (const auto &entry : list) {
32 std::string Arrays::toString(const std::vector<antlr4::tree::ParseTree*> &source) {
33 std::string result = "[";
34 bool firstEntry = true;
35 for (auto *value : source) {
36 result += value->toStringTree();