public override object Visit(ExceptionManagementStatement node, object obj)
 {
     if (node.Location == ((AstNode)obj).Location || found)
     {
         found = true;
         return(this.table);
     }
     return(base.Visit(node, obj));
 }
Ejemplo n.º 2
0
        public override Object Visit(ExceptionManagementStatement node, Object obj)
        {
            node.TryBlock.Accept(this, obj);

            for (int i = 0; i < node.CatchCount; i++)
            {
                node.GetCatchElement(i).Accept(this, obj);
            }

            if (node.FinallyBlock != null)
            {
                node.FinallyBlock.Accept(this, obj);
            }

            return(null);
        }
Ejemplo n.º 3
0
        public override Object Visit(ExceptionManagementStatement node, Object obj)
        {
            int indent = Convert.ToInt32(obj);

            this.printIndentation(indent);
            this.output.WriteLine("TryStatement [{0}:{1}]", node.Location.Line, node.Location.Column);
            node.TryBlock.Accept(this, indent + 1);
            this.printIndentation(indent);
            this.output.WriteLine("Catch [{0}:{1}]", node.Location.Line, node.Location.Column);
            for (int i = 0; i < node.CatchCount; i++)
            {
                node.GetCatchElement(i).Accept(this, indent + 1);
            }
            if (node.FinallyBlock != null)
            {
                this.printIndentation(indent);
                this.output.WriteLine("Finally [{0}:{1}]", node.Location.Line, node.Location.Column);
                node.FinallyBlock.Accept(this, indent + 1);
            }
            return(null);
        }
Ejemplo n.º 4
0
 public abstract Object Visit(ExceptionManagementStatement node, Object obj);