mjplusplus  v0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Attributes | List of all members
semantic::SemanticAnalysis Class Reference

#include <SemanticAnalysis.hpp>

Classes

struct  ClassTableItem
 

Public Member Functions

 SemanticAnalysis (shptr< ast::Program > program, shptr< ErrorReporter > errorReporter)
 
void reportError (std::string message)
 
void reportError (std::string message, shptr< ast::PositionAwareNode > node)
 
void reportError (std::string message, source_position_t position)
 
bool start ()
 
bool insertClass (const std::string &className, shptr< ast::ClassDeclaration > &node)
 
std::unordered_map
< std::string, ClassTableItem >
const & 
getClassTable () const
 
bool isTypeDefined (shptr< ast::Type > type, bool isVoidAcceptable=false)
 

Static Public Attributes

static shptr< ast::TypeIdent >
const 
systemTypeIdent
 

Constructor & Destructor Documentation

semantic::SemanticAnalysis::SemanticAnalysis ( shptr< ast::Program program,
shptr< ErrorReporter errorReporter 
)

Member Function Documentation

std::unordered_map< std::string, SemanticAnalysis::ClassTableItem > const & semantic::SemanticAnalysis::getClassTable ( ) const
bool semantic::SemanticAnalysis::insertClass ( const std::string &  className,
shptr< ast::ClassDeclaration > &  node 
)
bool semantic::SemanticAnalysis::isTypeDefined ( shptr< ast::Type type,
bool  isVoidAcceptable = false 
)
void semantic::SemanticAnalysis::reportError ( std::string  message)
void semantic::SemanticAnalysis::reportError ( std::string  message,
shptr< ast::PositionAwareNode node 
)
void semantic::SemanticAnalysis::reportError ( std::string  message,
source_position_t  position 
)
bool semantic::SemanticAnalysis::start ( )

Member Data Documentation

shptr< ast::TypeIdent > const semantic::SemanticAnalysis::systemTypeIdent
static
Initial value:
= std::make_shared<ast::TypeIdent>(
std::make_shared<ast::Type>(std::make_shared<ast::Ident>(lexer::Token {lexer::Token::Token_type::TOKEN_IDENT, lexer::Token::getTableReference("$System"), { -1, 0}})),
std::make_shared<ast::Ident>(lexer::Token {lexer::Token::Token_type::TOKEN_IDENT, lexer::Token::getTableReference("System"), { -1, 0}})
)

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