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

#include <Statement.hpp>

Inheritance diagram for ast::stmt::Statement:
ast::Node ast::stmt::Block ast::stmt::ExpressionStatement ast::stmt::IfStatement ast::stmt::LVDStatement ast::stmt::ReturnStatement ast::stmt::WhileStatement

Public Types

enum  Type { TYPE_SINGLE, TYPE_BLOCK, TYPE_IF }
 

Public Member Functions

virtual Type getType () const
 
virtual bool analyze (semantic::SemanticAnalysis &sa, shptr< semantic::symbol::SymbolTable > symboltable) const =0
 analyze a statement for semantic correctness, and recursivly analyze its children More...
 
virtual unsigned int countVariableDeclarations () const
 
virtual void accept (ASTVisitor &visitor) const
 
virtual int setVariablePositions (int) const
 
- Public Member Functions inherited from ast::Node
virtual void toString (std::ostream &out, unsigned int indent, bool special=false) const =0
 

Member Enumeration Documentation

Enumerator
TYPE_SINGLE 
TYPE_BLOCK 
TYPE_IF 

Member Function Documentation

void ast::stmt::Statement::accept ( ASTVisitor visitor) const
virtual
virtual bool ast::stmt::Statement::analyze ( semantic::SemanticAnalysis sa,
shptr< semantic::symbol::SymbolTable symboltable 
) const
pure virtual

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

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

Implemented in ast::stmt::LVDStatement, ast::stmt::Block, ast::stmt::IfStatement, ast::stmt::ReturnStatement, ast::stmt::WhileStatement, and ast::stmt::ExpressionStatement.

unsigned int ast::stmt::Statement::countVariableDeclarations ( ) const
virtual
Statement::Type ast::stmt::Statement::getType ( ) const
virtual

Reimplemented in ast::stmt::Block, and ast::stmt::IfStatement.

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

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