diff options
Diffstat (limited to 'tiger-compiler/src/ast/non-object-visitor.hxx')
| -rw-r--r-- | tiger-compiler/src/ast/non-object-visitor.hxx | 62 |
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 |
