Add skeletal format subcommand. (#4383)

This extracts out the SourceBuffer handling of `-` in order to trivially
share it.

Note this still has a number of TODOs, it's just setting up the
essential subcommand infrastructure, with some tests demonstrating that
it at least does something.
This commit is contained in:
Jon Ross-Perkins
2024-10-09 17:33:29 +00:00
committed by GitHub
parent 33954d1f20
commit 434173b016
15 changed files with 306 additions and 7 deletions
+4
View File
@@ -59,6 +59,10 @@ class ToolchainFileTest : public FileTestBase {
}
auto GetDefaultArgs() -> llvm::SmallVector<std::string> override {
if (component_ == "format") {
return {"format", "%s"};
}
llvm::SmallVector<std::string> args = {"compile",
"--phase=" + component_.str()};