LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
binder.hh
Go to the documentation of this file.
1 
6 #ifndef BIND_BINDER_HH
7 # define BIND_BINDER_HH
8 
9 # include <misc/error.hh>
10 # include <misc/scoped-map.hh>
11 # include <misc/fwd.hh>
12 # include <ast/default-visitor.hh>
13 # include <ast/object-visitor.hh>
14 
15 namespace bind
16 {
17 
51  {
52  public:
56  using super_type::operator();
57 
58  public:
60  const misc::error& error_get() const;
61 
62  /* The visiting methods. */
63  public:
64  virtual void operator()(ast::LetExp& e) override;
65  // FIXME: Some code was deleted here.
66 
67  // ---------------- //
68  // Visiting /Dec/. //
69  // ---------------- //
70 
73 
79 
85 
100 
103  template <class D>
104  void decs_visit(ast::AnyDecs<D>& e);
105 
107  template <class D>
108  void visit_dec_header(D& e);
109 
111  template <class D>
112  void visit_dec_body(D& e);
113 
114  // FIXME: Some code was deleted here.
116 
119  protected:
121  void error(const ast::Ast& loc, const std::string& msg);
122 
127  template <typename T>
128  void undeclared(const std::string& k, const T& e);
129 
134  template <typename T>
135  void redefinition(const T& e1, const T& e2);
137 
140  protected:
142  virtual void scope_begin();
144  virtual void scope_end();
147  protected:
153  template <typename NodeType, typename DefType>
154  void def_default(NodeType& e, DefType* def);
155 
156  // FIXME: Some code was deleted here (Members).
157  };
158 }
159 
160 # include <bind/binder.hxx>
161 
162 #endif // !BIND_BINDER_HH