#include <addition.h>
Inheritance diagram for expression_addition:

Public Member Functions | |
| virtual | ~expression_addition () |
| expression_addition (const expression::pointer &lhs, const expression::pointer &rhs) | |
Protected Member Functions | |
| int | get_precedence () const |
| void | traversal (int pprec) |
| type::pointer | get_type () const |
| bool | is_lvalue () const |
| side_effect_t | has_side_effect () const |
| bool | is_constant () const |
| virtual void | pre_order_traversal (int pprec) |
| virtual void | infix_order_traversal (int pprec) |
| virtual void | post_order_traversal (int pprec) |
| expression::pointer | get_lhs () const |
| expression::pointer | get_rhs () const |
Private Member Functions | |
| expression_addition () | |
| expression_addition (const expression_addition &) | |
| expression_addition & | operator= (const expression_addition &) |
Private Attributes | |
| expression::pointer | lhs |
| expression::pointer | rhs |
Definition at line 30 of file addition.h.
| virtual expression_addition::~expression_addition | ( | ) | [virtual] |
The destructor.
| expression_addition::expression_addition | ( | const expression::pointer & | lhs, | |
| const expression::pointer & | rhs | |||
| ) |
The constructor.
| expression_addition::expression_addition | ( | ) | [private] |
The default constructor. Do not use.
| expression_addition::expression_addition | ( | const expression_addition & | ) | [private] |
The copy constructor. Do not use.
| int expression_addition::get_precedence | ( | ) | const [protected, virtual] |
The get_precedence method is used to obtain the precedence of this expression node.
The highest precedence has the highest absolute value, the lowest precedence gets the lowest absolute value.
Implements expression.
| void expression_addition::traversal | ( | int | pprec | ) | [protected, virtual] |
The traversal method may be used to traverse each of the declaractions in the list.
| pprec | The precedence of the parent expression node. |
Implements expression.
| type::pointer expression_addition::get_type | ( | ) | const [protected, virtual] |
The get_type method is used to get the type of this expression.
Implements expression.
Reimplemented in expression_addition_address.
| bool expression_addition::is_lvalue | ( | ) | const [protected, virtual] |
The is_lvalue method is used to determine whether or not this expression is suitable to appear on the left hand side of an assignment expression.
Implements expression.
| side_effect_t expression_addition::has_side_effect | ( | ) | const [protected, virtual] |
The has_side_effect method is used to determine if an expression has any effect. It is used by the parse to produce "statement with no effect" warnings.
Implements expression.
| bool expression_addition::is_constant | ( | ) | const [protected, virtual] |
The is_constant method may be used to determine whether this expression node is a constant, or this tree would evaluate to a constant.
The default implementation is conservative, and always returns false.
Reimplemented from expression.
| virtual void expression_addition::pre_order_traversal | ( | int | pprec | ) | [protected, virtual] |
The pre_order_traversal method is used to perform actions required before the left hand expression is traversed.
| pprec | The parent expressions precedence. Not much use to code generators, but essential for pretty printers to get the parentheses correct. |
Reimplemented in expression_addition_pretty.
| virtual void expression_addition::infix_order_traversal | ( | int | pprec | ) | [protected, virtual] |
The infix_order_traversal method is used to perform actions required between the left and right hand expression traversals.
| pprec | The parent expressions precedence. |
Reimplemented in expression_addition_pretty.
| virtual void expression_addition::post_order_traversal | ( | int | pprec | ) | [protected, virtual] |
The post_order_traversal method is used to perform actions required after the right hand expression has been traversed.
| pprec | The parent expressions precedence. Not much use to code generators, but essential for pretty printers to get the parentheses correct. |
Reimplemented in expression_addition_address, expression_addition_integer, expression_addition_real, and expression_addition_pretty.
| expression::pointer expression_addition::get_lhs | ( | ) | const [inline, protected] |
| expression::pointer expression_addition::get_rhs | ( | ) | const [inline, protected] |
| expression_addition& expression_addition::operator= | ( | const expression_addition & | ) | [private] |
The assignment operator. Do not use.
expression::pointer expression_addition::lhs [private] |
expression::pointer expression_addition::rhs [private] |
1.5.1