mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
@@ -40,5 +40,5 @@ int main(int argc, char** argv)
|
||||
dbgln("{}", error);
|
||||
}
|
||||
|
||||
root->dump(0);
|
||||
root->dump();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user