DGen
- Added ability to flag whether symbol mapping should occur or not - By default enable symbol mapping
This commit is contained in:
parent
5833f9af67
commit
220e4789c4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue