mjplusplus
v0.4.1
|
#include <BinaryExpression.hpp>
Public Member Functions | |
virtual bool | isLValue () const |
virtual bool | standalone () const |
virtual std::pair< bool, bool > | constBool () const |
shptr< Expression > | getLeftChild () const |
shptr< Expression > | getRightChild () const |
![]() | |
Expression (source_position_t position) | |
virtual shptr< Type > | get_type (semantic::SemanticAnalysis &sa, shptr< semantic::symbol::SymbolTable > symbolTable) const =0 |
virtual void | accept (ASTVisitor &visitor) const |
![]() | |
source_position_t | getPosition () const |
PositionAwareNode (lexer::Token const &token) | |
PositionAwareNode (source_position_t const &position) | |
Static Public Member Functions | |
static shptr< BinaryExpression > | createBinaryExpr (shptr< Expression > leftChild, shptr< Expression > rightChild, lexer::Token::Token_type operator_type) |
Protected Member Functions | |
void | toString (std::ostream &out, unsigned int indent, std::string op, bool special=false) const |
virtual void | toString (std::ostream &out, unsigned int indent, bool special=false) const =0 |
BinaryExpression (shptr< Expression > leftChild, shptr< Expression > rightChild) | |
Protected Attributes | |
shptr< Expression > | leftChild |
shptr< Expression > | rightChild |
![]() | |
source_position_t | position |
|
protected |
|
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.
Implements ast::Expression.
Reimplemented in ast::be::OrOr, ast::be::AndAnd, ast::be::EqEq, and ast::be::NotEq.
|
static |
shptr< Expression > ast::be::BinaryExpression::getLeftChild | ( | ) | const |
shptr< Expression > ast::be::BinaryExpression::getRightChild | ( | ) | const |
|
virtual |
Implements ast::Expression.
|
virtual |
Implements ast::Expression.
Reimplemented in ast::be::Eq.
|
protected |
|
protectedpure 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.
Implemented in ast::be::Invalid, ast::be::OrOr, ast::be::AndAnd, ast::be::Mod, ast::be::GreaterThan, ast::be::GreaterThanEq, ast::be::Eq, ast::be::EqEq, ast::be::LessThan, ast::be::LessThanEq, ast::be::Slash, ast::be::Minus, ast::be::Plus, ast::be::Mult, and ast::be::NotEq.
|
protected |
|
protected |