/// <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"); } }
/// <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); }