The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
AST.ExceptionManagementStatement Class Reference

Encapsulates a Try-Catch-finally statement of our programming languages. As C# states catch blcok and finally block can be optional, but not at the same time. More...

Inheritance diagram for AST.ExceptionManagementStatement:
AST.Statement AST.AstNode

Public Member Functions

 ExceptionManagementStatement (Block tryBlock, List< CatchStatement > catchStatements, Block finallyBlock, Location location)
 Constructor of ExceptionManagementStatement More...
 
CatchStatement GetCatchElement (int index)
 Gets the element stored in the specified index. More...
 
override Object Accept (Visitor v, Object o)
 Accept method of a concrete visitor. More...
 
- Public Member Functions inherited from AST.Statement
override object AcceptOperation (AstOperation op, object arg)
 Dispatches expressions to the operation passed as argument. It provokes the execution of op.AcceptOperation(AstNode) with the parameter resolved polymorfically More...
 
- Public Member Functions inherited from AST.AstNode
override bool Equals (object obj)
 AntLR compares Nodes with the class name. This is not correct for our purposes. More...
 
override int GetHashCode ()
 

Properties

Block TryBlock [get, set]
 Gets the statements executed in Try block. More...
 
Block FinallyBlock [get, set]
 Gets the statements executed in Finally block. if there is no finally statementes can be null More...
 
int CatchCount [get]
 Gets the number of catch blocks. More...
 
- Properties inherited from AST.AstNode
Location Location [get]
 

Additional Inherited Members

- Protected Member Functions inherited from AST.Statement
 Statement (Location location)
 Protected constructor of Statement. More...
 
- Protected Member Functions inherited from AST.AstNode
 AstNode (Location location)
 Protected constructor of NodeAst More...
 
- Protected Attributes inherited from AST.AstNode
Location location
 Location: Encapsulates in one object the line, column and filename More...
 

Detailed Description

Encapsulates a Try-Catch-finally statement of our programming languages. As C# states catch blcok and finally block can be optional, but not at the same time.

Inheritance: Statement. Implements Composite pattern [Composite]. Implements Visitor pattern [Concrete Element].

Definition at line 40 of file ExceptionManagementStatement.cs.

Constructor & Destructor Documentation

AST.ExceptionManagementStatement.ExceptionManagementStatement ( Block  tryBlock,
List< CatchStatement catchStatements,
Block  finallyBlock,
Location  location 
)

Constructor of ExceptionManagementStatement

Parameters
tryStatsStatements to execute in Try block.
finallyStatsStatements asociated to the finally block.
locationLocation of the statement.

Definition at line 100 of file ExceptionManagementStatement.cs.

Member Function Documentation

override Object AST.ExceptionManagementStatement.Accept ( Visitor  v,
Object  o 
)
virtual

Accept method of a concrete visitor.

Parameters
vConcrete visitor
oOptional information to use in the visit.
Returns
Optional information to return

Implements AST.AstNode.

Definition at line 132 of file ExceptionManagementStatement.cs.

CatchStatement AST.ExceptionManagementStatement.GetCatchElement ( int  index)

Gets the element stored in the specified index.

Parameters
indexIndex.
Returns
Element stored in the specified index.

Definition at line 117 of file ExceptionManagementStatement.cs.

Property Documentation

int AST.ExceptionManagementStatement.CatchCount
get

Gets the number of catch blocks.

Definition at line 86 of file ExceptionManagementStatement.cs.

Block AST.ExceptionManagementStatement.FinallyBlock
getset

Gets the statements executed in Finally block. if there is no finally statementes can be null

Definition at line 77 of file ExceptionManagementStatement.cs.

Block AST.ExceptionManagementStatement.TryBlock
getset

Gets the statements executed in Try block.

Definition at line 67 of file ExceptionManagementStatement.cs.


The documentation for this class was generated from the following file: