summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/function-dec.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/ast/function-dec.hxx')
-rw-r--r--tiger-compiler/src/ast/function-dec.hxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/function-dec.hxx b/tiger-compiler/src/ast/function-dec.hxx
new file mode 100644
index 0000000..b9dda47
--- /dev/null
+++ b/tiger-compiler/src/ast/function-dec.hxx
@@ -0,0 +1,23 @@
+/**
+ ** \file ast/function-dec.hxx
+ ** \brief Inline methods of ast::FunctionDec.
+ */
+
+#pragma once
+
+#include <ast/function-dec.hh>
+
+namespace ast
+{
+
+ inline const VarChunk& FunctionDec::formals_get() const { return *formals_; }
+ inline VarChunk& FunctionDec::formals_get() { return *formals_; }
+
+ inline const NameTy* FunctionDec::result_get() const { return result_; }
+ inline NameTy* FunctionDec::result_get() { return result_; }
+
+ inline const Exp* FunctionDec::body_get() const { return body_; }
+ inline Exp* FunctionDec::body_get() { return body_; }
+ inline void FunctionDec::body_set(Exp* body) { body_ = body; }
+
+} // namespace ast