Fixes and tests for function declaration to string
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user