VariableDeclaration
- Added docstring - Cleaned up and refactored out into two separate statements (for variable name generation)
This commit is contained in:
parent
41e8db9a24
commit
272bfee124
|
@ -87,12 +87,19 @@ public final class VariableDeclaration : StorageDeclaration
|
|||
addInfo = "varName: "~varName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emits a string of the form:
|
||||
*
|
||||
* <varType> <varName>;
|
||||
*
|
||||
* Returns: The emitted code
|
||||
*/
|
||||
public override string emit()
|
||||
{
|
||||
string type = varType;
|
||||
string fullEntityName = context.tc.getResolver().generateName(context.getContainer(), context.tc.getResolver().resolveBest(context.getContainer(), varName));
|
||||
auto typedEntityVariable = context.tc.getResolver().resolveBest(context.getContainer(), varName); //TODO: Remove `auto`
|
||||
string typedEntityVariableName = context.tc.getResolver().generateName(context.getContainer(), typedEntityVariable);
|
||||
|
||||
return type~" "~fullEntityName~";";
|
||||
return varType~" "~typedEntityVariableName~";";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue