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

#include <BinaryExpression.hpp>

Inheritance diagram for ast::be::Mult:
ast::be::BinaryExpression ast::Expression ast::Node ast::PositionAwareNode

Public Member Functions

 Mult (shptr< Expression > leftChild, shptr< Expression > rightChild)
 
virtual void toString (std::ostream &out, unsigned int, bool=false) const
 
virtual shptr< Typeget_type (semantic::SemanticAnalysis &sa, shptr< semantic::symbol::SymbolTable > symbolTable) const
 
virtual void accept (ASTVisitor &visitor) const
 
- Public Member Functions inherited from ast::be::BinaryExpression
virtual bool isLValue () const
 
virtual bool standalone () const
 
virtual std::pair< bool, bool > constBool () const
 
shptr< ExpressiongetLeftChild () const
 
shptr< ExpressiongetRightChild () 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from ast::be::BinaryExpression
static shptr< BinaryExpressioncreateBinaryExpr (shptr< Expression > leftChild, shptr< Expression > rightChild, lexer::Token::Token_type operator_type)
 
- Protected Member Functions inherited from ast::be::BinaryExpression
void toString (std::ostream &out, unsigned int indent, std::string op, bool special=false) const
 
 BinaryExpression (shptr< Expression > leftChild, shptr< Expression > rightChild)
 
- Protected Attributes inherited from ast::be::BinaryExpression
shptr< ExpressionleftChild
 
shptr< ExpressionrightChild
 
- Protected Attributes inherited from ast::PositionAwareNode
source_position_t position
 

Constructor & Destructor Documentation

ast::be::Mult::Mult ( shptr< Expression leftChild,
shptr< Expression rightChild 
)

Member Function Documentation

void ast::be::Mult::accept ( ASTVisitor visitor) const
virtual

Reimplemented from ast::Expression.

shptr< Type > ast::be::Mult::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.

void ast::be::Mult::toString ( std::ostream &  out,
unsigned  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::be::BinaryExpression.


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