Zen
A cross-platform functional programming language

GrammarImplItem Class Reference

AST Node for a grammar implementation. More...

#include <Ast.hpp>

Inheritance diagram for GrammarImplItem:
ImplItem Node

List of all members.

Public Member Functions

 GrammarImplItem (const int &idx, const Ast::FunctionDef &fdef, const Ast::GrammarBlock &block)
 Default constructor.
z::string getUniqueName (const z::string &sep) const
 Returns the unique name for this implementation item.
const Ast::GrammarBlockgetBlock () const
 Returns the GrammarBlock for this implementation item.

Private Member Functions

virtual void visit (ImplItem::Visitor &visitor) const
 Abstract visitor function.
virtual const
Ast::FunctionImplItem
getFunctionImplItem () const
 Returns a reference to this if this is a FunctionImplItem, else throws exception.

Private Attributes

const Ast::GrammarBlock_block
 The grammar block.

Detailed Description

AST Node for a grammar implementation.


Constructor & Destructor Documentation

GrammarImplItem ( const int &  idx,
const Ast::FunctionDef fdef,
const Ast::GrammarBlock block 
) [inline]

Default constructor.

Parameters:
idxThe index of this item in the list of impl items.
fdefThe function definition implemented in this item.
blockThe grammar block for this item

Member Function Documentation

const Ast::GrammarBlock& getBlock ( ) const [inline]

Returns the GrammarBlock for this implementation item.

Returns:
The grammar block.
virtual const Ast::FunctionImplItem& getFunctionImplItem ( ) const [inline, private, virtual]

Returns a reference to this if this is a FunctionImplItem, else throws exception.

Returns:
A reference to this.

Implements ImplItem.

z::string getUniqueName ( const z::string sep) const [inline]

Returns the unique name for this implementation item.

Parameters:
sepThe separator
Returns:
The unique name.
void visit ( ImplItem::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements ImplItem.


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