Refactor subcommand addition for sharing. (#4474)

Trying to standardize the setup a little more.
This commit is contained in:
Jon Ross-Perkins authored and GitHub committed 2024-11-04 22:42:57 +00:00
1 parent ea0b0b4b48
commit 26e58b4587
12 files changed
+110 -87

No files matched your search

@@ -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.