mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -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()};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user