mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
This unifies `dump-tokens` and `dump-parse-tree` so that we don't keep writing basically the same code repeatedly. I'll need to modify the output of SemanticsIR::Print more, and may soon unify printing multiple IRs this way (particularly including the builtins SemanticsIR) but this is intended to offer a starting point. I may eventually try to unify lit.cfg.py files, but I was thinking about whether that works in various contexts we may run in and eventually decided copying the driver/testdata/lit.cfg.py file would be the easiest solution.
20 lines
676 B
C++
20 lines
676 B
C++
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
// Note: X-macro header. Do not use include guards.
|
|
|
|
#ifndef CARBON_SUBCOMMAND
|
|
// TODO: We should expand `HelpText` to be a short help name, a synopsis, and a
|
|
// long-form description.
|
|
#define CARBON_SUBCOMMAND(Name, Spelling, HelpText)
|
|
#endif
|
|
|
|
CARBON_SUBCOMMAND(Help, "help",
|
|
"Display help information about the driver options.")
|
|
CARBON_SUBCOMMAND(
|
|
Dump, "dump",
|
|
"Dumps intermediate compilation state for the input source file.")
|
|
|
|
#undef CARBON_SUBCOMMAND
|