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

Encapsulates a If-Else statement of our programming language. More...

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

Public Member Functions

 IfElseStatement (Expression exp, Statement trueBranch, Location location)
 Constructor of IfElseStatement More...
 
 IfElseStatement (Expression exp, Statement trueBranch, Statement falseBranch, Location location)
 Constructor of IfElseStatement More...
 
bool HaveElseBlock ()
 Returns true if the statement has a else block. Otherwise, false. 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 If-Else statement. More...
 
List< MoveStatementAfterCondition [get, set]
 Gets or sets the statements after condition. More...
 
Statement TrueBranch [get]
 Gets the block executed when the condition is true. More...
 
Statement FalseBranch [get]
 Gets the block executed when the condition is false. More...
 
List< ThetaStatementThetaStatements [get, set]
 Gets or sets the theta funcion statements More...
 
IList< SingleIdentifierExpressionReferencesUsedInTrueBranch [get]
 The set of references that are used in the if body. Used for SSA purposes. More...
 
IList< SingleIdentifierExpressionReferencesUsedInFalseBranch [get]
 The set of references that are used in the else body. 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 If-Else statement of our programming language.

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

Definition at line 35 of file IfElseStatement.cs.

Constructor & Destructor Documentation

AST.IfElseStatement.IfElseStatement ( Expression  exp,
Statement  trueBranch,
Location  location 
)

Constructor of IfElseStatement

Parameters
expCondition of the statement.
trueBranchBlock executed when the condition is true.
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 144 of file IfElseStatement.cs.

AST.IfElseStatement.IfElseStatement ( Expression  exp,
Statement  trueBranch,
Statement  falseBranch,
Location  location 
)

Constructor of IfElseStatement

Parameters
expCondition of the statement.
trueBranchBlock executed when the condition is true.
falseBranchBlock executed when the condition is false.
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 161 of file IfElseStatement.cs.

Member Function Documentation

override Object AST.IfElseStatement.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 194 of file IfElseStatement.cs.

bool AST.IfElseStatement.HaveElseBlock ( )

Returns true if the statement has a else block. Otherwise, false.

Returns
Returns true if the statement has a else block. Otherwise, false.

Definition at line 178 of file IfElseStatement.cs.

Property Documentation

List<MoveStatement> AST.IfElseStatement.AfterCondition
getset

Gets or sets the statements after condition.

Definition at line 90 of file IfElseStatement.cs.

Expression AST.IfElseStatement.Condition
getset

Gets the condition expression of If-Else statement.

Definition at line 82 of file IfElseStatement.cs.

Statement AST.IfElseStatement.FalseBranch
get

Gets the block executed when the condition is false.

Definition at line 105 of file IfElseStatement.cs.

IList<SingleIdentifierExpression> AST.IfElseStatement.ReferencesUsedInFalseBranch
get

The set of references that are used in the else body. Used for SSA purposes.

Definition at line 129 of file IfElseStatement.cs.

IList<SingleIdentifierExpression> AST.IfElseStatement.ReferencesUsedInTrueBranch
get

The set of references that are used in the if body. Used for SSA purposes.

Definition at line 121 of file IfElseStatement.cs.

List<ThetaStatement> AST.IfElseStatement.ThetaStatements
getset

Gets or sets the theta funcion statements

Definition at line 112 of file IfElseStatement.cs.

Statement AST.IfElseStatement.TrueBranch
get

Gets the block executed when the condition is true.

Definition at line 98 of file IfElseStatement.cs.


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