Copy Context information from the ParserNode across to the Instruction node (only so far for Module Variable Declaration DNodes' embedded PNode

This commit is contained in:
Tristan B. Kildaire 2021-11-09 15:50:04 +02:00
parent 3b36113a5b
commit de261ec511
1 changed files with 3 additions and 0 deletions

View File

@ -273,6 +273,9 @@ public final class TypeChecker
string variableName = resolver.generateName(modulle, variablePNode);
VariableDeclaration varDecInstr = new VariableDeclaration(variableName, 4);
/* NEW CODE (9th November 2021) Set the context */
varDecInstr.context = variablePNode.context;
/* Check if there is a VariableAssignmentInstruction */
Instruction possibleInstr = popInstr();
if(possibleInstr !is null)