ArkScript
A small, lisp-inspired, functional scripting language
Pass.hpp
Go to the documentation of this file.
1
/**
2
* @file Pass.hpp
3
* @author Lexy Plateau (lexplt.dev@gmail.com)
4
* @brief Interface for a compiler pass
5
* @date 2024-07-21
6
*
7
* @copyright Copyright (c) 2024-2026
8
*
9
*/
10
#ifndef ARK_COMPILER_PASS_HPP
11
#define ARK_COMPILER_PASS_HPP
12
13
#include <
Ark/Utils/Platform.hpp
>
14
#include <
Ark/Utils/Logger.hpp
>
15
16
#include <ostream>
17
18
namespace
Ark::internal
19
{
20
/**
21
* @brief An interface to describe compiler passes
22
*/
23
class
ARK_API
Pass
24
{
25
public
:
26
/**
27
* @brief Construct a new Pass object
28
*
29
* @param name the pass name, used for logging
30
* @param debug_level debug level
31
*/
32
Pass
(std::string name,
unsigned
debug_level);
33
34
virtual
~Pass
() =
default
;
35
36
/**
37
* @brief Set a custom output stream for the logger
38
*
39
* @param os output stream
40
*/
41
void
configureLogger(std::ostream& os);
42
43
protected
:
44
Logger
m_logger
;
45
};
46
}
47
48
#endif
// ARK_COMPILER_PASS_HPP
Logger.hpp
Internal logger.
ARK_API
#define ARK_API
Definition
Module.hpp:22
Platform.hpp
ArkScript configuration macros.
Ark::internal::Logger
Definition
Logger.hpp:28
Ark::internal::Pass
An interface to describe compiler passes.
Definition
Pass.hpp:24
Ark::internal::Pass::m_logger
Logger m_logger
Definition
Pass.hpp:44
Ark::internal::Pass::~Pass
virtual ~Pass()=default
Ark::internal
Definition
Builtins.hpp:26
include
Ark
Compiler
Pass.hpp
Generated on Thu Mar 19 2026 06:48:16 for ArkScript by
1.12.0