19 using System.Collections.Generic;
21 using System.Collections;
22 using System.Collections.ObjectModel;
23 using System.Diagnostics;
24 using System.Reflection;
26 using ErrorManagement;
47 private Block tryBlock;
52 private List<CatchStatement> catchStatements;
57 private Block finallyBlock;
68 get {
return this.tryBlock; }
69 set { this.tryBlock = value;}
78 get {
return this.finallyBlock; }
79 set { this.finallyBlock = value; }
87 get {
return this.catchStatements.Count; }
102 this.tryBlock = tryBlock;
103 this.catchStatements = catchStatements;
104 this.finallyBlock = finallyBlock;
110 #region GetCatchElement()
119 return this.catchStatements[index];
134 return v.Visit(
this, o);
Encapsulates a block of statements.
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
Encapsulates a Catch statement of our programming languages.
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Abstract class represents a programming language statement.
CatchStatement GetCatchElement(int index)
Gets the element stored in the specified index.
Block TryBlock
Gets the statements executed in Try block.
int CatchCount
Gets the number of catch blocks.
Encapsulates a Try-Catch-finally statement of our programming languages. As C# states catch blcok and...
ExceptionManagementStatement(Block tryBlock, List< CatchStatement > catchStatements, Block finallyBlock, Location location)
Constructor of ExceptionManagementStatement
Location location
Location: Encapsulates in one object the line, column and filename
Block FinallyBlock
Gets the statements executed in Finally block. if there is no finally statementes can be null ...