CompilerPass.h 467 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/NonnullRefPtr.h>
  8. #include <AK/RecursionDecision.h>
  9. #include "Forward.h"
  10. namespace JSSpecCompiler {
  11. class CompilerPass {
  12. public:
  13. CompilerPass(FunctionRef function)
  14. : m_function(function)
  15. {
  16. }
  17. virtual ~CompilerPass() = default;
  18. virtual void run() = 0;
  19. protected:
  20. FunctionRef m_function;
  21. };
  22. }