LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
op-exp.hh
Go to the documentation of this file.
1
6
#ifndef AST_OP_EXP_HH
7
# define AST_OP_EXP_HH
8
9
# include <
ast/exp.hh
>
10
11
namespace
ast
12
{
13
15
class
OpExp
:
public
Exp
16
{
17
18
public
:
20
enum
Oper
21
{
22
// Arithmetics. add, sub, mul, div,
27
28
// Comparison. eq, ne, lt, le, gt, ge
35
};
36
39
public
:
41
OpExp
(
const
Location
& location,
Exp
* left,
OpExp::Oper
oper,
42
Exp
* right);
44
virtual
~OpExp
();
47
48
49
public
:
51
virtual
void
accept
(
ConstVisitor
& v)
const override
;
53
virtual
void
accept
(
Visitor
& v)
override
;
55
58
public
:
60
const
Exp
&
left_get
()
const
;
62
Exp
&
left_get
();
64
OpExp::Oper
oper_get
()
const
;
66
const
Exp
&
right_get
()
const
;
68
Exp
&
right_get
();
71
protected
:
73
Exp
*
left_
;
75
OpExp::Oper
oper_
;
77
Exp
*
right_
;
78
};
79
80
}
// namespace ast
81
82
83
// Return a representation of an operator.
84
std::string
85
str
(
ast::OpExp::Oper
oper);
86
87
# include <
ast/op-exp.hxx
>
88
89
#endif // !AST_OP_EXP_HH
ast
op-exp.hh
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2