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
14#include <Ark/Utils/Logger.hpp>
15
16#include <ostream>
17
18namespace Ark::internal
19{
20 /**
21 * @brief An interface to describe compiler passes
22 */
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:
45 };
46}
47
48#endif // ARK_COMPILER_PASS_HPP
Internal logger.
#define ARK_API
Definition Module.hpp:22
ArkScript configuration macros.
An interface to describe compiler passes.
Definition Pass.hpp:24
virtual ~Pass()=default