Inheritance: AbstractScope
Ejemplo n.º 1
0
 public void PushIfStmt(IfScope ifblock)
 {
     this.ifScopes.Push(ifblock);
     this.allScopes.Push(ifblock);
 }
Ejemplo n.º 2
0
        private void IfStatementEnter(XmlNode node)
        {
            if (CurrentBlock.BreaksOutOfScope)
            {
                CurrentBlock = new CFGBlock();
                Graph.AddVertex(CurrentBlock);
            }
            CFGBlock conditionBlock = ConnectNewBlockTo(CurrentBlock, EdgeType.Normal);
            CurrentBlock = conditionBlock;

            CFGBlock trueBlock = ConnectNewBlockTo(CurrentBlock, EdgeType.True);
            CurrentBlock = trueBlock;

            conditionBlock.AstEntryNode = node;

            var ifScope = new IfScope(conditionBlock, trueBlock) { EndBlock = new CFGBlock() };
            Graph.AddVertex(ifScope.EndBlock);

            DoNotVisitChildren(Conditional.GetCondNode(node));
            scopeHandler.PushIfStmt(ifScope);
        }