Type check if and while conditions

This commit is contained in:
2024-06-05 19:53:04 +02:00
parent 8c2ea58693
commit 41c957e906
6 changed files with 70 additions and 41 deletions

View File

@@ -55,53 +55,40 @@ namespace elna::source
return m_type;
}
constant_info::constant_info(const std::shared_ptr<const class type> type, const std::int32_t value)
: m_type(type), m_value(value)
typed_info::typed_info(std::shared_ptr<const class type> type)
: m_type(type)
{
}
constant_info::~constant_info()
typed_info::~typed_info()
{
}
std::shared_ptr<const class type> constant_info::type() const noexcept
std::shared_ptr<const class type> typed_info::type() const noexcept
{
return m_type;
}
constant_info::constant_info(const std::shared_ptr<const class type> type, const std::int32_t value)
: typed_info(type), m_value(value)
{
}
std::int32_t constant_info::value() const noexcept
{
return m_value;
}
variable_info::variable_info(std::shared_ptr<const class type> type)
: m_type(type)
: typed_info(type)
{
}
variable_info::~variable_info()
{
}
std::shared_ptr<const class type> variable_info::type() noexcept
{
return m_type;
}
parameter_info::parameter_info(std::shared_ptr<const class type> type)
: m_type(type)
: typed_info(type)
{
}
parameter_info::~parameter_info()
{
}
std::shared_ptr<const class type> parameter_info::type() const noexcept
{
return m_type;
}
intrinsic_info::intrinsic_info(const class procedure_type& type)
: m_type(std::make_shared<procedure_type>(type))
{