Пример #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);
 }