diff options
2 files changed, 4 insertions, 3 deletions
| -rw-r--r-- | JSImpl/src/ASTPrinter.cpp | 5 | ||||
| -rw-r--r-- | JSImpl/src/Parser.cpp | 2 |
diff --git a/JSImpl/src/ASTPrinter.cpp b/JSImpl/src/ASTPrinter.cpp index d8f5ff8..4dc07f4 100644 --- a/JSImpl/src/ASTPrinter.cpp +++ b/JSImpl/src/ASTPrinter.cpp @@ -36,12 +36,13 @@ void Print(std::ostream& os, ASTPrinter &printer, const char* name, const IPLVec void Print(std::ostream& os, ASTPrinter &printer, const char* name, const IPLVector<IPLString>& list, bool isLast) { - os << "\"" << name << "\" : [ \n"; + os << "\"" << name << "\" : ["; for (auto i = 0; i < list.size(); ++i) { + os << "\"" << list[i] << "\""; if (i + 1 != list.size()) { - os << list[i] << ","; + os << ","; } } os << "]"; diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp index 28fee72..9bf9922 100644 --- a/JSImpl/src/Parser.cpp +++ b/JSImpl/src/Parser.cpp @@ -930,7 +930,7 @@ ExpressionPtr Parser::Parse() ExpressionPtr Parser::FunctionDefinition() { - auto FormalParameters = [=](IPLVector<IPLString> identifiers) -> bool { + auto FormalParameters = [=](IPLVector<IPLString>& identifiers) -> bool { if (Match(TokenType::LeftParen)) { while (Match(TokenType::Identifier)) |
