Example #1
0
 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);
 }