summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/non-object-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/ast/non-object-visitor.hxx
add: added projectsHEADmain
Diffstat (limited to 'tiger-compiler/src/ast/non-object-visitor.hxx')
-rw-r--r--tiger-compiler/src/ast/non-object-visitor.hxx62
1 files changed, 62 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/non-object-visitor.hxx b/tiger-compiler/src/ast/non-object-visitor.hxx
new file mode 100644
index 0000000..8d49932
--- /dev/null
+++ b/tiger-compiler/src/ast/non-object-visitor.hxx
@@ -0,0 +1,62 @@
+/**
+ ** \file ast/non-object-visitor.hxx
+ ** \brief Implementation for ast/non-object-visitor.hh.
+ */
+
+#pragma once
+
+#include <ast/all.hh>
+#include <ast/non-object-visitor.hh>
+#include <misc/contract.hh>
+
+namespace ast
+{
+ template <template <typename> class Const>
+ GenNonObjectVisitor<Const>::GenNonObjectVisitor()
+ : GenVisitor<Const>()
+ {}
+
+ template <template <typename> class Const>
+ GenNonObjectVisitor<Const>::~GenNonObjectVisitor()
+ {}
+
+ /*-----------------------------------------.
+ | Object-related visit methods, disabled. |
+ `-----------------------------------------*/
+
+ template <template <typename> class Const>
+ void GenNonObjectVisitor<Const>::operator()(const_t<ClassTy>&)
+ {
+ // We must not be here (there should be no object feature in plain Tiger).
+ unreachable();
+ }
+
+ template <template <typename> class Const>
+ void GenNonObjectVisitor<Const>::operator()(const_t<MethodChunk>&)
+ {
+ // We must not be here (there should be no object feature in plain Tiger).
+ unreachable();
+ }
+
+ template <template <typename> class Const>
+ void GenNonObjectVisitor<Const>::operator()(const_t<MethodDec>&)
+ {
+ // We must not be here (there should be no object feature in plain Tiger).
+ unreachable();
+ }
+
+ template <template <typename> class Const>
+ void GenNonObjectVisitor<Const>::operator()(const_t<MethodCallExp>&)
+ {
+ // We must not be here (there should be no object feature in plain Tiger).
+ unreachable();
+ }
+
+ template <template <typename> class Const>
+ void GenNonObjectVisitor<Const>::operator()(const_t<ObjectExp>&)
+ {
+ // We must not be here (there should be no object feature in plain Tiger).
+ unreachable();
+ }
+
+} // namespace ast