コード例 #1
0
ファイル: ASTRecursor.cs プロジェクト: highjin/firefromheaven
 public virtual void Visit(LoopStmt loopStmt, object[] args)
 {
     foreach (Statement s in loopStmt.Content)
     {
         s.Accept(this);
     }
 }
コード例 #2
0
 public virtual void Visit(LoopStmt loopStmt, object[] args)
 {
     foreach (Statement s in loopStmt.Content)
     {
         s.Accept(this);
     }
 }
コード例 #3
0
 public override void Visit(LoopStmt loopStmt, object[] args)
 {
     loopStack.Push(loopStmt);
     base.Visit(loopStmt, args);
     loopStack.Pop();
 }
コード例 #4
0
        public void Visit(LoopStmt loopStmt, object[] args)
        {
            RightValue rightValue = exprProcessor.Eval(loopStmt.Condition);
            if (rightValue.ToBoolean())
            {
                kernel.RuntimeData.InstructionStack.Push(loopStmt);
                kernel.RuntimeData.ScopeStack.Open(new LocalScope());
                kernel.RuntimeData.InstructionStack.Push(InstructionStack.CLOSE_LOCAL_SCOPE_FLAG);
                kernel.RuntimeData.InstructionStack.Push(loopStmt.Content);
            }
            else
            {
                //Nothing to do
            }

            kernel.Next();
        }