29 lines
523 B
C++
29 lines
523 B
C++
#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;
|
|
std::vector<std::shared_ptr<Type>> m_types;
|
|
|
|
void push(std::shared_ptr<Type> type);
|
|
std::shared_ptr<Type> pop();
|
|
};
|
|
}
|
|
|
|
#endif
|