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

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

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

Public Member Functions

 ForStatement (List< Statement > init, Expression cond, List< Statement > iter, Statement statements, Location location)
 Constructor of ForStatement More...
 
Statement GetInitializerElement (int index)
 Gets the element stored in the specified index. More...
 
Statement GetIteratorElement (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

int InitializerCount [get]
 Gets the number of initializer expressions of For statement. More...
 
Expression Condition [get, set]
 Gets the condition expression of For Statement. More...
 
int IteratorCount [get]
 Gets the number of iterator expression of For loop. More...
 
Statement Statements [get]
 Gets the block executed while the condition is true. More...
 
List< MoveStatementAfterInit [get, set]
 Gets or sets the statements to use after initialization More...
 
List< MoveStatementAfterCondition [get, set]
 Gets or sets the statements after condition. More...
 
List< ThetaStatementBeforeCondition [get, set]
 Gets or sets the statements before condition. More...
 
Block AuxInitializer [get]
 Gets the auxiliar block of variable declarations 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 For statement of our programming languages.

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

Definition at line 34 of file ForStatement.cs.

Constructor & Destructor Documentation

AST.ForStatement.ForStatement ( List< Statement init,
Expression  cond,
List< Statement iter,
Statement  statements,
Location  location 
)

Constructor of ForStatement

Parameters
initInicialization of loop variables.
condCondition of For loop. Could be null.
iterIterator expression of For loop.
statementsBlock executed in the For loop.
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 164 of file ForStatement.cs.

Member Function Documentation

override Object AST.ForStatement.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 238 of file ForStatement.cs.

Statement AST.ForStatement.GetInitializerElement ( int  index)

Gets the element stored in the specified index.

Parameters
indexIndex.
Returns
Element stored in the specified index.

Definition at line 195 of file ForStatement.cs.

Statement AST.ForStatement.GetIteratorElement ( int  index)

Gets the element stored in the specified index.

Parameters
indexIndex.
Returns
Element stored in the specified index.

Definition at line 209 of file ForStatement.cs.

Property Documentation

List<MoveStatement> AST.ForStatement.AfterCondition
getset

Gets or sets the statements after condition.

Definition at line 128 of file ForStatement.cs.

List<MoveStatement> AST.ForStatement.AfterInit
getset

Gets or sets the statements to use after initialization

Definition at line 119 of file ForStatement.cs.

Block AST.ForStatement.AuxInitializer
get

Gets the auxiliar block of variable declarations

Definition at line 146 of file ForStatement.cs.

List<ThetaStatement> AST.ForStatement.BeforeCondition
getset

Gets or sets the statements before condition.

Definition at line 137 of file ForStatement.cs.

Expression AST.ForStatement.Condition
getset

Gets the condition expression of For Statement.

Definition at line 94 of file ForStatement.cs.

int AST.ForStatement.InitializerCount
get

Gets the number of initializer expressions of For statement.

Definition at line 86 of file ForStatement.cs.

int AST.ForStatement.IteratorCount
get

Gets the number of iterator expression of For loop.

Definition at line 103 of file ForStatement.cs.

Statement AST.ForStatement.Statements
get

Gets the block executed while the condition is true.

Definition at line 111 of file ForStatement.cs.


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