- Added ability to flag whether symbol mapping should occur or not
- By default enable symbol mapping
This commit is contained in:
Tristan B. Velloza Kildaire 2023-07-22 18:12:16 +02:00
parent 5833f9af67
commit 220e4789c4
1 changed files with 25 additions and 0 deletions

View File

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