#include <UnaryExpression.hpp>
Enumerator |
---|
UNARY_NOT |
|
UNARY_MINUS |
|
ast::ue::UnaryExpression::UnaryExpression |
( |
shptr< Expression > |
child, |
|
|
int |
size |
|
) |
| |
|
protected |
std::pair< bool, bool > ast::ue::UnaryExpression::constBool |
( |
| ) |
const |
|
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::ue::Not.
Creates an Expression using the given child expression and the operator vector. If the operator vector is empty, the child is returned. Else the corresponding UnaryExpression is returned.
- Parameters
-
child | child expression |
operator_types | operator vector |
- Returns
- expr, either the child or an UnaryExpression
int ast::ue::UnaryExpression::getSize |
( |
| ) |
const |
|
virtual |
bool ast::ue::UnaryExpression::isLValue |
( |
| ) |
const |
|
virtual |
bool ast::ue::UnaryExpression::standalone |
( |
| ) |
const |
|
virtual |
void ast::ue::UnaryExpression::toString |
( |
std::ostream & |
out, |
|
|
unsigned int |
indent, |
|
|
std::string |
op, |
|
|
bool |
special = false |
|
) |
| const |
|
protected |
virtual void ast::ue::UnaryExpression::toString |
( |
std::ostream & |
out, |
|
|
unsigned int |
indent, |
|
|
bool |
special = false |
|
) |
| const |
|
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::ue::Neg, and ast::ue::Not.
int ast::ue::UnaryExpression::size |
|
protected |
The documentation for this class was generated from the following files: