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

Encapsulates a Switch statement of our programming languages. More...

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

Public Member Functions

 SwitchStatement (Expression cond, List< SwitchSection > sections, Location location)
 Constructor of SwitchStatement More...
 
int LabelCount ()
 Gets the number of labels the switch statement has. More...
 
SwitchSection GetSwitchSectionElement (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

Expression Condition [get, set]
 Gets the condition expression of Switch Statement. More...
 
int SwitchBlockCount [get]
 Gets the number of cases used in Switch statement. More...
 
List< MoveStatementAfterCondition [get, set]
 
List< ThetaStatementThetaStatements [get, set]
 Gets or sets the theta funcion statements More...
 
IDictionary< Block, IList
< SingleIdentifierExpression > > 
ReferencesUsedCases [get]
 The set of references used in each case body, including the default section. Used for SSA purposes. 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 Switch statement of our programming languages.

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

Definition at line 35 of file SwitchStatement.cs.

Constructor & Destructor Documentation

AST.SwitchStatement.SwitchStatement ( Expression  cond,
List< SwitchSection sections,
Location  location 
)

Constructor of SwitchStatement

Parameters
condCondition expression of Switch statement.
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 128 of file SwitchStatement.cs.

Member Function Documentation

override Object AST.SwitchStatement.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 180 of file SwitchStatement.cs.

SwitchSection AST.SwitchStatement.GetSwitchSectionElement ( int  index)

Gets the element stored in the specified index.

Parameters
indexIndex.
Returns
Element stored in the specified index.

Definition at line 165 of file SwitchStatement.cs.

int AST.SwitchStatement.LabelCount ( )

Gets the number of labels the switch statement has.

Returns
Number of labels the switch statement has.

Definition at line 145 of file SwitchStatement.cs.

Property Documentation

List<MoveStatement> AST.SwitchStatement.AfterCondition
getset

Gets or sets the statements after condition.

Definition at line 95 of file SwitchStatement.cs.

Expression AST.SwitchStatement.Condition
getset

Gets the condition expression of Switch Statement.

Definition at line 78 of file SwitchStatement.cs.

IDictionary<Block, IList<SingleIdentifierExpression> > AST.SwitchStatement.ReferencesUsedCases
get

The set of references used in each case body, including the default section. Used for SSA purposes.

Definition at line 113 of file SwitchStatement.cs.

int AST.SwitchStatement.SwitchBlockCount
get

Gets the number of cases used in Switch statement.

Definition at line 87 of file SwitchStatement.cs.

List<ThetaStatement> AST.SwitchStatement.ThetaStatements
getset

Gets or sets the theta funcion statements

Definition at line 104 of file SwitchStatement.cs.


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