1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:55:08 +00:00

LibCpp: Generalize ASTNode::dump() to support redirecting its output

Previously, ASTNode::dump() used outln() for output, which meant it
always wrote its output to stdout.

After this commit, ASTNode::dump() receives an 'output' argument (which
is stdout by default). This enables writing the output to somewhere
else.

This will be useful for testing the LibCpp Parser with the output of
ASTNode::dump.
This commit is contained in:
Itamar 2021-05-17 13:04:15 +03:00 committed by Andreas Kling
parent 463a91c4a2
commit 402483ec1f
4 changed files with 194 additions and 194 deletions

View file

@ -40,5 +40,5 @@ int main(int argc, char** argv)
dbgln("{}", error);
}
root->dump(0);
root->dump();
}