Zen
A cross-platform functional programming language

ExprStatement Class Reference

AST Node representing an expression statement. More...

#include <Ast.hpp>

Inheritance diagram for ExprStatement:
Statement Node

List of all members.

Public Member Functions

 ExprStatement (const Ast::Expr &expr)
 Default constructor.
const ExprgetExpr () const
 Returns the statement's expression.

Private Member Functions

virtual void visit (Statement::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const Ast::Expr_expr
 The statement's expression.

Detailed Description

AST Node representing an expression statement.

For example:

        a + b;

Here, \'a + b\' is an expression, and the entire line is a statement containing that expression.


Constructor & Destructor Documentation

ExprStatement ( const Ast::Expr expr) [inline]

Default constructor.

Parameters:
exprThe expression for this statement

Member Function Documentation

const Expr& getExpr ( ) const [inline]

Returns the statement's expression.

Returns:
The statement's expression
void visit ( Statement::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Statement.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines