This repository has been archived on 2023-09-10. You can view files and clone it, but cannot push or open issues/pull-requests.
2023-09-09 22:03:28 +00:00
|
|
|
#ifndef jk_STATICPASS_HPP
|
|
|
|
#define jk_STATICPASS_HPP
|
|
|
|
|
|
|
|
#include "commons.hpp"
|
|
|
|
#include "SymTable.hpp"
|
|
|
|
#include "Node.hpp"
|
|
|
|
|
|
|
|
namespace jk
|
|
|
|
{
|
|
|
|
class StaticPass
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit StaticPass(std::shared_ptr<SymTable> sym, Logger& logger);
|
|
|
|
virtual ~StaticPass();
|
|
|
|
|
|
|
|
void pass(std::shared_ptr<Node> node);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<SymTable> m_sym;
|
|
|
|
Logger& m_logger;
|
2023-09-10 06:06:34 +00:00
|
|
|
std::vector<std::shared_ptr<Type>> m_types;
|
|
|
|
|
|
|
|
void push(std::shared_ptr<Type> type);
|
|
|
|
std::shared_ptr<Type> pop();
|
2023-09-09 22:03:28 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|