![]() |
Zen
A cross-platform functional programming language
|
AST Node representing a for statement. More...
#include <Ast.hpp>
Public Member Functions | |
| ForStatement (const Ast::InitVariableDef &init, const Ast::Expr &cond, const Ast::Expr &incx, const Ast::StatementList &list) | |
| Default constructor. | |
| const Ast::InitVariableDef & | getInit () const |
| Returns a reference to the loop variable. | |
| const Ast::Expr & | getCond () const |
| Returns a reference to the exit condition expression. | |
| const Ast::Expr & | getIncx () const |
| Returns a reference to the increment expression for the for loop. | |
| const Ast::StatementList & | getList () const |
| Returns a reference to the statement list in the for block. | |
Private Member Functions | |
| virtual void | visit (Statement::Visitor &visitor) const |
| Abstract visitor function. | |
Private Attributes | |
| const Ast::InitVariableDef & | _init |
| The variable defined for this for loop. | |
| const Ast::Expr & | _cond |
| The exit condition to test. | |
| const Ast::Expr & | _incx |
| The expression to increment the for variable. | |
| const Ast::StatementList & | _list |
| The statement list for the for loop. | |
AST Node representing a for statement.
| ForStatement | ( | const Ast::InitVariableDef & | init, |
| const Ast::Expr & | cond, | ||
| const Ast::Expr & | incx, | ||
| const Ast::StatementList & | list | ||
| ) | [inline] |
Default constructor.
| init | The variable defined for this for loop |
| cond | The exit condition to test |
| incx | The expression to increment the for variable |
| list | The statement list for the for loop |
| const Ast::Expr& getCond | ( | ) | const [inline] |
Returns a reference to the exit condition expression.
| const Ast::Expr& getIncx | ( | ) | const [inline] |
Returns a reference to the increment expression for the for loop.
| const Ast::InitVariableDef& getInit | ( | ) | const [inline] |
Returns a reference to the loop variable.
| const Ast::StatementList& getList | ( | ) | const [inline] |
Returns a reference to the statement list in the for block.
| void visit | ( | Statement::Visitor & | visitor | ) | const [private, virtual] |