예제 #1
0
        public ASTVisitor(StatementList ast)
        {
            this.linkNodes   = new List <Node>();
            this._cfg        = new CFGEntry();
            this.currentNode = this._cfg;
            ast.accept(this);

            CFGExit exit = new CFGExit();

            if (this.linkNodes.Count > 0)
            {
                this.currentNode = new CFGExit();
                linkParentNodes();
            }
            else
            {
                this.currentNode.add(exit);
            }
        }
예제 #2
0
 public void visitExit(CFGExit e)
 {
     add(e);
 }