summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/type/visitor.hxx
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
commit967be9e750221ab2ab783f95df79bb26d290a45e (patch)
tree6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/type/visitor.hxx
add: added projectsHEADmain
Diffstat (limited to 'tiger-compiler/src/type/visitor.hxx')
-rw-r--r--tiger-compiler/src/type/visitor.hxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/tiger-compiler/src/type/visitor.hxx b/tiger-compiler/src/type/visitor.hxx
new file mode 100644
index 0000000..93a0f9b
--- /dev/null
+++ b/tiger-compiler/src/type/visitor.hxx
@@ -0,0 +1,29 @@
+/**
+ ** \file type/visitor.hxx
+ ** \brief Definition of type::Visitor.
+ */
+
+#pragma once
+
+#include <type/type.hh>
+#include <type/visitor.hh>
+
+namespace type
+{
+ template <template <typename> class Const>
+ GenVisitor<Const>::~GenVisitor() = default;
+
+ template <template <typename> class Const>
+ void GenVisitor<Const>::operator()(const_t<Type>& e)
+ {
+ e.accept(*this);
+ }
+
+ template <template <typename> class Const>
+ template <class E>
+ void GenVisitor<Const>::operator()(E* e)
+ {
+ e->accept(*this);
+ }
+
+} // namespace type