Add commas between parameters in REPL.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2021-01-03 14:50:14 +01:00
parent 856c37a583
commit 4c4faac899
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 5 additions and 1 deletions

View File

@ -206,9 +206,13 @@ namespace MalachScript::Parser {
void Stringify(std::stringstream& stream, const std::string& prefix, bool isLast) const override {
stream << "(";
for (auto& param : GetParameters()) {
for (size_t i = 0; i < _parameters.size(); i++) {
auto& param = _parameters[i];
param->GetTypeStatement()->Stringify(stream, prefix, isLast);
stream << " " << param->GetIdentifier();
if (i != _parameters.size() - 1) {
stream << ", ";
}
}
stream << ")";
}