Exemplo n.º 1
0
 bool ProcessAllow(TempCondition con)
 {
     if (con.Allow != null && !ResolveOperand(con.Allow).LogicOperation())
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
        private void ProcessCallWhile()
        {
            CodeWhile     @while    = (CodeWhile)this.m_scriptInstruction.operand0;
            TempCondition condition = @while.While;
            ScriptContext context   = new ScriptContext(m_script, condition.Executable, this, Executable_Block.While);
            TempCondition con       = @while.While;

            do
            {
                if (!this.ProcessAllow(con))
                {
                    return;
                }
                new ScriptContext(this.m_script, con.Executable, this, Executable_Block.While).Execute();
            }while (!context.IsOver);
        }
Exemplo n.º 3
0
        void ProcessCallWhile()
        {
            CodeWhile     code      = (CodeWhile)m_scriptInstruction.Operand0;
            TempCondition condition = code.While;

            for ( ; ;)
            {
                if (!ProcessCondition(condition, Executable_Block.While))
                {
                    break;
                }
                if (condition.Context.IsBreak)
                {
                    break;
                }
            }
        }
Exemplo n.º 4
0
 bool ProcessCondition(TempCondition con, Executable_Block block)
 {
     if (con == null)
     {
         return(false);
     }
     if (con.Allow != null)
     {
         object b = ResolveOperand(con.Allow).ObjectValue;
         if (b == null || b.Equals(false))
         {
             return(false);
         }
     }
     con.Context.Initialize(this);
     con.Context.Execute();
     return(true);
 }
Exemplo n.º 5
0
        void ProcessCallWhile()
        {
            CodeWhile     code      = (CodeWhile)m_scriptInstruction.Operand0;
            TempCondition condition = code.While;

            for ( ; ;)
            {
                ScriptContext context = condition.GetContext();
                if (!ProcessCondition(condition, context, Executable_Block.While))
                {
                    break;
                }
                if (context.IsOver)
                {
                    break;
                }
            }
        }
Exemplo n.º 6
0
        void ProcessCallWhile()
        {
            CodeWhile     code      = (CodeWhile)m_scriptInstruction.Operand0;
            TempCondition condition = code.While;
            ScriptContext context;

            for ( ; ;)
            {
                if (!ProcessAllow(condition))
                {
                    break;
                }
                context = new ScriptContext(m_script, condition.Executable, this, Executable_Block.While);
                context.Execute();
                if (context.IsOver)
                {
                    break;
                }
            }
        }
Exemplo n.º 7
0
 bool ProcessCondition(TempCondition con, Executable_Block block)
 {
     if (con == null)
     {
         return(false);
     }
     if (con.Allow != null)
     {
         ScriptBoolean b = ResolveOperand(con.Allow) as ScriptBoolean;
         if (b == null)
         {
             throw new ExecutionException("if 条件必须是一个bool型");
         }
         if (b.Value == false)
         {
             return(false);
         }
     }
     con.Context.Initialize(this);
     con.Context.Execute();
     return(true);
 }
Exemplo n.º 8
0
 void ProcessCondition(TempCondition condition)
 {
     new ScriptContext(m_script, condition.Executable, this, condition.Block).Execute();
 }
Exemplo n.º 9
0
 internal void AddElseIf(TempCondition con)
 {
     ElseIf.Add(con);
 }