mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09: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:
parent
463a91c4a2
commit
402483ec1f
Notes:
sideshowbarker
2024-07-18 17:44:58 +09:00
Author: https://github.com/itamar8910
Commit: 402483ec1f
Pull-request: https://github.com/SerenityOS/serenity/pull/7261
4 changed files with 194 additions and 194 deletions
|
@ -40,5 +40,5 @@ int main(int argc, char** argv)
|
|||
dbgln("{}", error);
|
||||
}
|
||||
|
||||
root->dump(0);
|
||||
root->dump();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue