Generate code for loops

This commit is contained in:
2024-04-18 12:15:26 +02:00
parent c6ef27d809
commit aa5579f234
13 changed files with 788 additions and 333 deletions

View File

@ -99,6 +99,50 @@ namespace elna::source
{
}
operand::~operand() noexcept
{
}
integer_operand::integer_operand(const std::int32_t value)
: m_value(value)
{
}
std::int32_t integer_operand::value() const noexcept
{
return m_value;
}
variable_operand::variable_operand(const std::string& name)
: m_name(name)
{
}
const std::string& variable_operand::name() const noexcept
{
return m_name;
}
temporary_variable::temporary_variable(const std::size_t counter)
: m_counter(counter)
{
}
std::size_t temporary_variable::counter() const noexcept
{
return m_counter;
}
label_operand::label_operand(const std::size_t counter)
: m_counter(counter)
{
}
std::size_t label_operand::counter() const noexcept
{
return m_counter;
}
node::node(const struct position position)
: source_position(position)
{