DGen
- When generating symbols for `Variable`, if it IS `isExternal()` then do not symbol map, else symbol map
This commit is contained in:
parent
99de4fec22
commit
59edbde04d
|
@ -1194,13 +1194,23 @@ public final class DCodeEmitter : CodeEmitter
|
|||
// Extract the Variable's type
|
||||
Type varType = typeChecker.getType(var.context.container, var.getType());
|
||||
|
||||
// FIXME: Set proper scope type
|
||||
string renamedSymbol = mapper.map(var, ScopeType.GLOBAL);
|
||||
// Decide on the symbol's name
|
||||
string symbolName;
|
||||
|
||||
// If it is NOT extern then map it
|
||||
if(!var.isExternal())
|
||||
{
|
||||
// FIXME: Set proper scope type
|
||||
symbolName = mapper.map(var, ScopeType.GLOBAL);
|
||||
}
|
||||
// If it is extern, then leave it as such
|
||||
else
|
||||
{
|
||||
symbolName = var.getName();
|
||||
}
|
||||
|
||||
// <type> <name>
|
||||
signature = typeTransform(varType)~" "~renamedSymbol;
|
||||
|
||||
// TODO: Add extern here?
|
||||
signature = typeTransform(varType)~" "~symbolName;
|
||||
|
||||
return signature;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue