33 lines
920 B
C++
33 lines
920 B
C++
#ifndef PORYGONLANG_BOUNDREQUIREEXPRESSION_HPP
|
|
#define PORYGONLANG_BOUNDREQUIREEXPRESSION_HPP
|
|
|
|
#include "BoundExpression.hpp"
|
|
#include "../../Script.hpp"
|
|
|
|
namespace Porygon::Binder {
|
|
class BoundRequireExpression : public BoundExpression {
|
|
Script* _module;
|
|
public:
|
|
BoundRequireExpression(Script* script, unsigned int start,
|
|
unsigned int length)
|
|
: BoundExpression(start, length, script->GetReturnType()),
|
|
_module(script){}
|
|
|
|
~BoundRequireExpression() final{
|
|
delete _module;
|
|
}
|
|
|
|
[[nodiscard]]
|
|
inline Script* GetModule() const{
|
|
return _module;
|
|
}
|
|
|
|
[[nodiscard]]
|
|
inline BoundExpressionKind GetKind() const final {
|
|
return BoundExpressionKind::Require;
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //PORYGONLANG_BOUNDREQUIREEXPRESSION_HPP
|