diff --git a/source/tlang/compiler/codegen/emit/dgen.d b/source/tlang/compiler/codegen/emit/dgen.d index 4a9a719b..d8fabbca 100644 --- a/source/tlang/compiler/codegen/emit/dgen.d +++ b/source/tlang/compiler/codegen/emit/dgen.d @@ -22,10 +22,35 @@ import tlang.compiler.configuration : CompilerConfiguration; public final class DCodeEmitter : CodeEmitter { + /** + * Whether or not symbol mappi g should + * apply to identifiers + */ + private bool symbolMapping; + // NOTE: In future store the mapper in the config please this(TypeChecker typeChecker, File file, CompilerConfiguration config, SymbolMapper mapper) { super(typeChecker, file, config, mapper); + + // By default symbols will be mapped + enableSymbolMapping(); + } + + /** + * Enables symbol mapping + */ + private void enableSymbolMapping() + { + this.symbolMapping = true; + } + + /** + * Disables symbol mapping + */ + private void disableSymbolMapping() + { + this.symbolMapping = false; } private ulong transformDepth = 0;