diff options
| Commit | 8aa55f1c0d34f0938dc3abc29f5cd1bfd705b487 (patch) | |
|---|---|---|
| Author | 2018-10-14 17:49:08 +0300 | |
| Committer | 2018-10-14 17:49:08 +0300 | |
| Files | c84727ad23f7b46501976f8146ac0f6f9df19b62 /JSImpl | |
| IPL-8aa55f1c0d34f0938dc3abc29f5cd1bfd705b487.tar IPL-8aa55f1c0d34f0938dc3abc29f5cd1bfd705b487.tar.gz IPL-8aa55f1c0d34f0938dc3abc29f5cd1bfd705b487.zip | ||
| Parent | 2621d30da58795a19fa2c90978f766e173a8ca2f (diff) | |
Minor fixes.
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)) |
