mjplusplus
v0.4.1
|
#include <Expression.hpp>
Public Member Functions | |
Expression (source_position_t position) | |
virtual shptr< Type > | get_type (semantic::SemanticAnalysis &sa, shptr< semantic::symbol::SymbolTable > symbolTable) const =0 |
virtual bool | isLValue () const =0 |
virtual bool | standalone () const =0 |
virtual std::pair< bool, bool > | constBool () const =0 |
virtual void | accept (ASTVisitor &visitor) const |
![]() | |
virtual void | toString (std::ostream &out, unsigned int indent, bool special=false) const =0 |
![]() | |
source_position_t | getPosition () const |
PositionAwareNode (lexer::Token const &token) | |
PositionAwareNode (source_position_t const &position) | |
Additional Inherited Members | |
![]() | |
source_position_t | position |
ast::Expression::Expression | ( | source_position_t | position | ) |
|
virtual |
Reimplemented from ast::Node.
Reimplemented in ast::be::Invalid, ast::be::OrOr, ast::be::AndAnd, ast::be::Mod, ast::be::GreaterThan, ast::be::GreaterThanEq, ast::be::Eq, ast::pe::MethodInvocation, ast::be::EqEq, ast::pe::NewObjectExpression, ast::be::LessThan, ast::be::LessThanEq, ast::pe::NewArrayExpression, ast::be::Slash, ast::pe::Integer, ast::be::Minus, ast::pe::Object, ast::ue::Neg, ast::be::Plus, ast::ue::Not, ast::be::Mult, ast::pe::Ident, ast::be::NotEq, ast::pe::Bool, and ast::po::PostfixExpression.
|
pure virtual |
Special while check for definite return analysis: Return a pair<bool,bool>. The first bool signifies whether it is a constant bool expression, and in this case, the second bool is the result.
Implemented in ast::be::OrOr, ast::be::AndAnd, ast::be::EqEq, ast::ue::Not, ast::ue::UnaryExpression, ast::be::NotEq, ast::pe::Bool, ast::be::BinaryExpression, ast::po::PostfixExpression, and ast::pe::PrimaryExpression.
|
pure 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.
Implemented in ast::be::Invalid, ast::be::OrOr, ast::be::AndAnd, ast::be::Mod, ast::be::GreaterThan, ast::be::GreaterThanEq, ast::be::Eq, ast::pe::MethodInvocation, ast::be::EqEq, ast::be::LessThan, ast::pe::NewObjectExpression, ast::be::LessThanEq, ast::pe::NewArrayExpression, ast::be::Slash, ast::pe::Integer, ast::be::Minus, ast::pe::Object, ast::ue::Neg, ast::be::Plus, ast::ue::Not, ast::be::Mult, ast::pe::Ident, ast::be::NotEq, ast::pe::Bool, and ast::po::PostfixExpression.
|
pure virtual |
|
pure virtual |