示例#1
0
 static public int GetLine(IntPtr l)
 {
     try {
         Dsl.StatementData self = (Dsl.StatementData)checkSelf(l);
         var ret = self.GetLine();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#2
0
 protected override bool Load(Dsl.StatementData statementData)
 {
     Dsl.FunctionData funcData1 = statementData.First;
     Dsl.FunctionData funcData2 = statementData.Second;
     if (funcData2.GetId() == ":")
     {
         Dsl.ISyntaxComponent cond = funcData1.Call.GetParam(0);
         Dsl.ISyntaxComponent op1  = funcData1.GetStatement(0);
         Dsl.ISyntaxComponent op2  = funcData2.GetStatement(0);
         m_Op1 = Calculator.Load(cond);
         m_Op2 = Calculator.Load(op1);
         m_Op3 = Calculator.Load(op2);
     }
     else
     {
         //error
         Console.WriteLine("DslCalculator error, {0} line {1}", statementData.ToScriptString(false), statementData.GetLine());
     }
     return(true);
 }