mjplusplus  v0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ast::stmt::Block Class Reference

#include <Block.hpp>

Inheritance diagram for ast::stmt::Block:
ast::stmt::Statement ast::Node

Public Member Functions

 Block (shptr< vec< shptr< Statement > > > block_statements)
 
virtual void toString (std::ostream &out, unsigned int indent, bool special=false) const
 
virtual Statement::Type getType () const
 
virtual bool analyze (semantic::SemanticAnalysis &sa, shptr< semantic::symbol::SymbolTable > symbolTable) const
 analyze a statement for semantic correctness, and recursivly analyze its children More...
 
shptr< vec< shptr< Statement > > > getStatements () const
 
virtual unsigned int countVariableDeclarations () const
 
virtual int setVariablePositions (int) const
 
virtual void accept (ASTVisitor &visitor) const
 

Additional Inherited Members

- Public Types inherited from ast::stmt::Statement
enum  Type { TYPE_SINGLE, TYPE_BLOCK, TYPE_IF }
 

Constructor & Destructor Documentation

ast::stmt::Block::Block ( shptr< vec< shptr< Statement > > >  block_statements)

Member Function Documentation

void ast::stmt::Block::accept ( ASTVisitor visitor) const
virtual

Reimplemented from ast::stmt::Statement.

bool ast::stmt::Block::analyze ( semantic::SemanticAnalysis sa,
shptr< semantic::symbol::SymbolTable symboltable 
) const
virtual

analyze a statement for semantic correctness, and recursivly analyze its children

Returns
true iff all paths of this statement contsin a return statement

Implements ast::stmt::Statement.

unsigned int ast::stmt::Block::countVariableDeclarations ( ) const
virtual

Reimplemented from ast::stmt::Statement.

shptr< vec< shptr< Statement > > > ast::stmt::Block::getStatements ( ) const
Statement::Type ast::stmt::Block::getType ( ) const
virtual

Reimplemented from ast::stmt::Statement.

int ast::stmt::Block::setVariablePositions ( int  pos) const
virtual

Reimplemented from ast::stmt::Statement.

void ast::stmt::Block::toString ( std::ostream &  out,
unsigned int  indent,
bool  special = false 
) const
virtual

writes a representation of the Node to out, including all children. special invokes "special" behavior for certain nodes MethodDeclaration: print static keyword Block & If: skip indentation Expression: don't print surrounding parens in addition Block doesn't print newline after trailing } if ~indent is passed instead of indent

Implements ast::Node.


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