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

#include <PrimaryExpression.hpp>

Inheritance diagram for ast::pe::Ident:
ast::pe::PrimaryExpression ast::IdentBase ast::Expression ast::Node ast::PositionAwareNode

Public Member Functions

 Ident (shptr< ast::Ident > identifier)
 
virtual void toString (std::ostream &out, unsigned int ident, bool=false) const
 
virtual shptr< Typeget_type (semantic::SemanticAnalysis &sa, shptr< semantic::symbol::SymbolTable > symbolTable) const
 
virtual bool isLValue () const
 
virtual void accept (ASTVisitor &visitor) const
 
virtual std::string const & getIdentifier () const
 
- Public Member Functions inherited from ast::pe::PrimaryExpression
 PrimaryExpression (source_position_t position)
 
virtual bool standalone () const
 
virtual std::pair< bool, bool > constBool () const
 
- Public Member Functions inherited from ast::Expression
 Expression (source_position_t position)
 
- Public Member Functions inherited from ast::PositionAwareNode
source_position_t getPosition () const
 
 PositionAwareNode (lexer::Token const &token)
 
 PositionAwareNode (source_position_t const &position)
 
- Public Member Functions inherited from ast::IdentBase
shptr< VariableDeclaration const > getDeclaration () const
 

Additional Inherited Members

- Protected Member Functions inherited from ast::IdentBase
 IdentBase ()
 
- Protected Attributes inherited from ast::PositionAwareNode
source_position_t position
 
- Protected Attributes inherited from ast::IdentBase
shptr< VariableDeclaration const > declaration
 

Constructor & Destructor Documentation

ast::pe::Ident::Ident ( shptr< ast::Ident identifier)

Member Function Documentation

void ast::pe::Ident::accept ( ASTVisitor visitor) const
virtual

Reimplemented from ast::Expression.

shptr< Type > ast::pe::Ident::get_type ( semantic::SemanticAnalysis sa,
shptr< semantic::symbol::SymbolTable symbolTable 
) const
virtual

Idea: When getting the type of an Expression, the Expression checks if it's own and it's children Expressions type definitions are valid and then returns it's type. If something is invalid, an error is printed in the Expression that is invalid and an empty pointer is returned.

Implements ast::Expression.

std::string const & ast::pe::Ident::getIdentifier ( ) const
virtual
bool ast::pe::Ident::isLValue ( ) const
virtual

Implements ast::Expression.

void ast::pe::Ident::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: