
#ifndef PORYGONLANG_VARIABLEASSIGMENTRESULT_HPP
#define PORYGONLANG_VARIABLEASSIGMENTRESULT_HPP

#include "BoundVariableKey.hpp"

namespace Porygon::Binder {
    enum class VariableAssignmentResult {
        Ok,
        ExplicitLocalVariableExists,
        VariableDefinedWithDifferentType
    };

    class VariableAssignment {
        VariableAssignmentResult _result;
        const BoundVariableKey *_key;
    public:
        VariableAssignment(VariableAssignmentResult result, BoundVariableKey *key) {
            _result = result;
            _key = key;
        }

        [[nodiscard]]
        inline VariableAssignmentResult GetResult() {
            return _result;
        }

        [[nodiscard]]
        inline const BoundVariableKey *GetKey() {
            return _key;
        }
    };
}

#endif //PORYGONLANG_VARIABLEASSIGMENTRESULT_HPP
