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
fragment.hxx
Go to the documentation of this file.
1
6
#ifndef TREE_FRAGMENT_HXX
7
# define TREE_FRAGMENT_HXX
8
9
# include <
temp/temp.hh
>
10
# include <
tree/fwd.hh
>
11
# include <
tree/fragment.hh
>
12
# include <
temp/label.hh
>
13
14
namespace
tree
15
{
16
17
inline
std::ostream&
18
operator<<
(std::ostream& o,
const
Fragment
& f)
19
{
20
return
f.
dump
(o);
21
}
22
23
24
/*--------------------.
25
| DataFrag: strings. |
26
`--------------------*/
27
28
inline
29
DataFrag::DataFrag
(
const
temp::Label
& label,
const
std::string& data)
30
: label_(label)
31
, data_(data)
32
{}
33
34
inline
temp::Label
35
DataFrag::label_get
()
const
36
{
37
return
label_
;
38
}
39
40
inline
const
std::string&
41
DataFrag::data_get
()
const
42
{
43
return
data_
;
44
}
45
46
47
/*-----------------------.
48
| ProcFrag: procedures. |
49
`-----------------------*/
50
51
inline
52
ProcFrag::ProcFrag
(
const
temp::Label
& label,
53
const
misc::symbol
& name,
54
const
rStm& body,
55
const
frame::Frame
* frame)
56
: label_(label)
57
, name_(name)
58
, body_(body)
59
, frame_(frame)
60
, save_fp_(temp::
Temp
())
61
{}
62
63
inline
64
ProcFrag::~ProcFrag
()
65
{
66
delete
frame_
;
67
}
68
69
70
inline
temp::Label
71
ProcFrag::label_get
()
const
72
{
73
return
label_
;
74
}
75
76
inline
const
misc::symbol
&
77
ProcFrag::name_get
()
const
78
{
79
return
name_
;
80
}
81
82
inline
rStm
83
ProcFrag::body_get
()
const
84
{
85
return
body_
;
86
}
87
88
inline
void
89
ProcFrag::body_set
(
const
rStm& body)
90
{
91
body_
= body;
92
}
93
94
inline
const
frame::Frame
&
95
ProcFrag::frame_get
()
const
96
{
97
return
*
frame_
;
98
}
99
100
101
}
/* namespace tree */
102
103
#endif // !TREE_FRAGMENT_HXX
tree
fragment.hxx
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2