Exemplo n.º 1
0
 /// <summary>
 /// Generates code for a var parameter node
 /// </summary>
 /// <param name="varParameter">The node to generate code for</param>
 private void GenerateCodeForVarParameter(VarParameterNode varParameter)
 {
     Debugger.Write("Generating code for Var Parameter");
     if (varParameter.Identifier.Declaration is IVariableDeclarationNode varDeclaration)
     {
         code.AddInstruction(varDeclaration.RuntimeEntity.GenerateInstructionToLoadAddress());
     }
     else
     {
         Debugger.Write("Error: The identifier is not a variable and you should have picked this problem up during type checking");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Carries out identification on a var parameter node
 /// </summary>
 /// <param name="varParameter">The node to perform identification on</param>
 private void PerformIdentificationOnVarParameter(VarParameterNode varParameter)
 {
     PerformIdentification(varParameter.Identifier);
 }