- Removed redundant imports

Dependency

- Set the context for the `VariableAssignmentStdAlone` entity
- Removed words that show I have the mental maturity of a 12 year old

----

 Test cases

 - Updated `simple_variables_decls_ass.t`
 - Updated `simples_variables.t`
function_parameters_fix
parent 908356c27b
commit 5364380e7c

@ -48,8 +48,6 @@ public final class DCodeEmitter : CodeEmitter
auto typedEntityVariable = context.tc.getResolver().resolveBest(context.getContainer(), varAs.varName); //TODO: Remove `auto`
string typedEntityVariableName = context.tc.getResolver().generateName(context.getContainer(), typedEntityVariable);
import compiler.codegen.mapper : SymbolMapper;
string renamedSymbol = SymbolMapper.symbolLookup(context.getContainer(), typedEntityVariableName);
@ -84,7 +82,6 @@ public final class DCodeEmitter : CodeEmitter
//NOTE: We may need to create a symbol table actually and add to that and use that as these names
//could get out of hand (too long)
// NOTE: Best would be identity-mapping Entity's to a name
import compiler.codegen.mapper : SymbolMapper;
string renamedSymbol = SymbolMapper.symbolLookup(context.getContainer(), varDecInstr.varName);
/* TODO: We might need to do a hold and emit */

@ -1275,10 +1275,13 @@ public class DNodeGenerator
{
VariableAssignmentStdAlone vAsStdAl = cast(VariableAssignmentStdAlone)entity;
/* Set the Context */
vAsStdAl.setContext(context);
/* TODO: CHeck avriable name even */
gprintln("VAGINA");
gprintln("YEAST ENJOYER");
assert(tc.getResolver().resolveWithin(c, vAsStdAl.getVariableName()));
gprintln("VAGINA");
gprintln("YEAST ENJOYER");
Variable variable = cast(Variable)tc.getResolver().resolveWithin(c, vAsStdAl.getVariableName());
assert(variable);
/* Pool the variable */

@ -1,5 +1,8 @@
module simple_variables;
module simple_variables_decls_ass;
int x = 1+2+2+1;
int y = 2;
int y = 2;
discard "TODO: Technically the below should not be allowed as we cannot do it in C - sadly";
y = 5+5;

@ -0,0 +1,5 @@
module simple_variables_decls_ass;
int x = 1+2+2+1;
int y = 2;
Loading…
Cancel
Save