diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/ast/fwd.hh | |
Diffstat (limited to 'tiger-compiler/src/ast/fwd.hh')
| -rw-r--r-- | tiger-compiler/src/ast/fwd.hh | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/fwd.hh b/tiger-compiler/src/ast/fwd.hh new file mode 100644 index 0000000..3d2a611 --- /dev/null +++ b/tiger-compiler/src/ast/fwd.hh @@ -0,0 +1,80 @@ +/** + ** \file ast/fwd.hh + ** \brief Forward declarations of all AST classes + ** (needed by the visitors). + */ + +#pragma once + +#include <list> +#include <vector> +#include <misc/fwd.hh> +#include <misc/vector.hh> + +namespace ast +{ + class ArrayExp; + class ArrayTy; + class AssertExp; + class AssignExp; + class Ast; + class BreakExp; + class CallExp; + class CastExp; + class ChunkList; + class ClassTy; + class Dec; + class Escapable; + class Exp; + class Field; + class FieldInit; + class FieldVar; + class ForExp; + class FunctionDec; + class IfExp; + class IntExp; + class LetExp; + class MethodCallExp; + class MethodDec; + class NameTy; + class NilExp; + class ObjectExp; + class OpExp; + class RecordExp; + class RecordTy; + class SeqExp; + class SimpleVar; + class StringExp; + class SubscriptVar; + class Ty; + class Typable; + class TypeConstructor; + class TypeDec; + class Var; + class VarDec; + class WhileExp; + + // From visitor.hh + template <template <typename> class Const> class GenVisitor; + using ConstVisitor = GenVisitor<misc::constify_traits>; + using Visitor = GenVisitor<misc::id_traits>; + + // Collections of nodes. + using exps_type = std::vector<Exp*>; + using fieldinits_type = std::vector<FieldInit*>; + using fields_type = std::vector<Field*>; + + // From chunk-interface.hh. + class ChunkInterface; + + // From chunk-list.hh. + class ChunkList; + + // From chunk.hh. + template <typename T> class Chunk; + using FunctionChunk = Chunk<FunctionDec>; + using MethodChunk = Chunk<MethodDec>; + using TypeChunk = Chunk<TypeDec>; + using VarChunk = Chunk<VarDec>; + +} // namespace ast |
