protected override bool Load(Dsl.FunctionData callData) { Dsl.ISyntaxComponent param1 = callData.GetParam(0); Dsl.ISyntaxComponent param2 = callData.GetParam(1); m_VarId = param1.GetId(); m_Val = Interpreter.Load(param2); return(true); }
protected override void Load(Dsl.FunctionData callData) { int num = callData.GetParamNum(); if (num > 1) { m_Id.InitFromDsl(callData.GetParam(0)); m_SubstId.InitFromDsl(callData.GetParam(1)); } }
private bool LoadCall(Dsl.FunctionData callData) { m_LoadedOptArgs = new Dictionary <string, IStoryValue>(); foreach (var pair in m_OptArgs) { StoryValue val = new StoryValue(); val.InitFromDsl(pair.Value); m_LoadedOptArgs.Add(pair.Key, val); } m_LoadedArgs = new List <IStoryValue>(); int num = callData.GetParamNum(); for (int i = 0; i < num; ++i) { StoryValue val = new StoryValue(); val.InitFromDsl(callData.GetParam(i)); m_LoadedArgs.Add(val); } if (null == m_PrologueCommand) { m_PrologueCommand = new CompositePrologueCommandHelper(this); } if (null == m_EpilogueCommand) { m_EpilogueCommand = new CompositeEpilogueCommandHelper(this); } return(true); }
protected override bool Load(Dsl.FunctionData funcData) { if (funcData.IsHighOrder) { Dsl.ISyntaxComponent cond = funcData.LowerOrderFunction.GetParam(0); m_Condition = Interpreter.Load(cond); for (int ix = 0; ix < funcData.GetParamNum(); ++ix) { IExpression subExp = Interpreter.Load(funcData.GetParam(ix)); m_Expressions.Add(subExp); } } else { //error Interpreter.Log("Interpreter error, {0} line {1}", funcData.ToScriptString(false), funcData.GetLine()); } return(true); }
protected override bool Load(Dsl.StatementData statementData) { Dsl.FunctionData funcData1 = statementData.First; Dsl.FunctionData funcData2 = statementData.Second; if (funcData1.IsHighOrder && funcData1.HaveLowerOrderParam() && funcData2.GetId() == ":" && funcData2.HaveParamOrStatement()) { Dsl.ISyntaxComponent cond = funcData1.LowerOrderFunction.GetParam(0); Dsl.ISyntaxComponent op1 = funcData1.GetParam(0); Dsl.ISyntaxComponent op2 = funcData2.GetParam(0); m_Op1 = Interpreter.Load(cond); m_Op2 = Interpreter.Load(op1); m_Op3 = Interpreter.Load(op2); } else { //error Interpreter.Log("Interpreter error, {0} line {1}", statementData.ToScriptString(false), statementData.GetLine()); } return(true); }
protected override bool Load(Dsl.FunctionData callData) { m_ArgIndex = Interpreter.Load(callData.GetParam(0)); return(true); }