Fixes and tests for function declaration to string

This commit is contained in:
2019-09-05 16:41:12 +02:00
parent 256969e912
commit f547715842
2 changed files with 26 additions and 5 deletions

View File

@@ -42,13 +42,14 @@ namespace Porygon::Binder {
}
void GetTreeString(std::stringstream& stream, size_t indents) const override{
for (size_t i = 0; i < indents; i++)
stream << "\t";
DrawIndents(stream, indents);
stream << "FunctionDeclaration" << endl;
for (size_t i = 0; i < indents; i++)
stream << "\t";
stream << "Key: " << _key->GetIdentifier()->GetString().get() << endl;
DrawIndents(stream, indents);
stream << "Key: " << _key->GetIdentifier()->GetDebugString() << endl;
DrawIndents(stream, indents);
stream << "Type: " << _type->ToString() << endl;
DrawIndents(stream, indents);
stream << "Block:" << endl;
_block->GetTreeString(stream, indents + 1);
}