public Variables InitiateVariables(Variables runtime) { var parm = new Dictionary <string, ValueBase>(); for (int i = 0; i < Parameters.Count; i++) { parm.Add(Func.Parameters[i].TheName, ValueBase.Create(Func.Parameters[i].TheType, runtime, Parameters[i])); } if (Func.FuncType != DefType.Void) { parm.Add(ProgramBuilder.VariableReturn, ValueBase.Create(Func.FuncType)); } return(new Variables(runtime, parm)); }
public void DeclareVariable(DefType theType, string name, ExpBase exp) { ValueBase variable = ValueBase.Create(theType, this, exp); Vars.Add(name, variable); }