aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/tablegen.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/tablegen.ts')
-rw-r--r--lib/compilers/tablegen.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/compilers/tablegen.ts b/lib/compilers/tablegen.ts
index ea2465000..1ce51f2cc 100644
--- a/lib/compilers/tablegen.ts
+++ b/lib/compilers/tablegen.ts
@@ -1,5 +1,7 @@
import {BaseCompiler} from '../base-compiler.js';
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
+import {TableGenParser} from './argument-parsers.js';
+import {CompilerOverrideType} from '../../types/compilation/compiler-overrides.interfaces.js';
export class TableGenCompiler extends BaseCompiler {
static get key() {
@@ -17,4 +19,26 @@ export class TableGenCompiler extends BaseCompiler {
override isCfgCompiler() {
return false;
}
+
+ override getArgumentParser() {
+ return TableGenParser;
+ }
+
+ override async populatePossibleOverrides() {
+ const possibleActions = await TableGenParser.getPossibleActions(this);
+ if (possibleActions.length > 0) {
+ this.compiler.possibleOverrides?.push({
+ name: CompilerOverrideType.action,
+ display_title: 'Action',
+ description:
+ 'The action to perform, which is the backend you wish to ' +
+ 'run. By default, the records are just printed as text.',
+ flags: ['<value>'],
+ values: possibleActions,
+ default: '--print-records',
+ });
+ }
+
+ await super.populatePossibleOverrides();
+ }
}