Refactor subcommand addition for sharing. (#4474)

Trying to standardize the setup a little more.
This commit is contained in:
Jon Ross-Perkins
2024-11-04 22:42:57 +00:00
committed by GitHub
parent ea0b0b4b48
commit 26e58b4587
12 changed files with 110 additions and 87 deletions
@@ -8,13 +8,16 @@
namespace Carbon {
constexpr CommandLine::CommandInfo LanguageServerSubcommand::Info = {
static constexpr CommandLine::CommandInfo SubcommandInfo = {
.name = "language-server",
.help = R"""(
Runs the language server.
)""",
};
LanguageServerSubcommand::LanguageServerSubcommand()
: DriverSubcommand(SubcommandInfo) {}
auto LanguageServerSubcommand::Run(DriverEnv& driver_env) -> DriverResult {
// TODO: Consider a way to override stdin, but it's a `FILE*` so less
// convenient to work with.