LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mem.hxx
Go to the documentation of this file.
1 
6 #ifndef TREE_MEM_HXX
7 # define TREE_MEM_HXX
8 
9 # include <tree/mem.hh>
10 
11 namespace tree
12 {
13 
14  inline
15  Mem::Mem(const rExp& exp)
16  : Exp()
17  {
18  child_push_back(exp);
19  }
20 
21  inline rExp
22  Mem::exp_get() const
23  {
24  return child_get(0).cast<Exp>();
25  }
26 
27  inline void
28  Mem::exp_set(const rExp& exp)
29  {
30  children_.pop_back();
31  children_.push_back(exp);
32  }
33 
34 }
35 
36 #endif // !TREE_MEM_HXX