
#ifndef PORYGONLANG_PARSEDTABLEEXPRESSION_HPP
#define PORYGONLANG_PARSEDTABLEEXPRESSION_HPP

#include "ParsedExpression.hpp"
#include "../ParsedStatements/ParsedStatement.hpp"

namespace Porygon::Parser {
    class ParsedTableExpression : public ParsedExpression {
        const ParsedBlockStatement *_block;
    public:
        ParsedTableExpression(ParsedBlockStatement *block, unsigned int start, unsigned int length)
                : ParsedExpression(start, length), _block(block) {
        }

        ~ParsedTableExpression() final {
            delete _block;
        }

        const ParsedBlockStatement *GetBlock() const {
            return _block;
        }

        const ParsedExpressionKind GetKind() const final {
            return ParsedExpressionKind::Table;
        }
    };
}
#include "ParsedExpression.hpp"

#endif //PORYGONLANG_PARSEDTABLEEXPRESSION_HPP
