From 27cc9539e7aa3837a7be4d2a7bc40801b3b7a5e4 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 30 Oct 2024 08:38:48 +0200 Subject: [PATCH] Commands - Added option or controlling `tir:flatten_enum_refs` on the command-line --- source/tlang/commandline/commands.d | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/tlang/commandline/commands.d b/source/tlang/commandline/commands.d index 06b02c00..cb10738e 100644 --- a/source/tlang/commandline/commands.d +++ b/source/tlang/commandline/commands.d @@ -129,6 +129,10 @@ mixin template TypeCheckerBase() @(ArgConfig.optional) bool warnUnusedFunctions = true; + @ArgNamed("flattenEnumRefs|fer", "Whether or not to flatten enumeration type member references during code generation") + @(ArgConfig.optional) + bool flattenEnumRefs = true; + void TypeCheckerInit(Compiler compiler) { // Set whether to warn about unused variables @@ -136,6 +140,9 @@ mixin template TypeCheckerBase() // Set whether to warn about unused functions compiler.getConfig().addConfig(ConfigEntry("typecheck:warnUnusedFuncs", warnUnusedFunctions)); + + // Set whether to flatten enum member references + compiler.getConfig().addConfig(ConfigEntry("tir:flatten_enum_refs", flattenEnumRefs)); } }