Implement case statements
This commit is contained in:
@ -292,6 +292,16 @@ namespace elna::boot
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<constant_info> info::is_constant()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<variable_info> info::is_variable()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
type_info::type_info(const type symbol)
|
||||
: symbol(symbol)
|
||||
{
|
||||
@ -317,6 +327,21 @@ namespace elna::boot
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<constant_info> constant_info::is_constant()
|
||||
{
|
||||
return std::static_pointer_cast<constant_info>(shared_from_this());
|
||||
}
|
||||
|
||||
variable_info::variable_info(const std::string& name, const type symbol)
|
||||
: name(name), symbol(symbol)
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<variable_info> variable_info::is_variable()
|
||||
{
|
||||
return std::static_pointer_cast<variable_info>(shared_from_this());;
|
||||
}
|
||||
|
||||
std::shared_ptr<symbol_table> builtin_symbol_table()
|
||||
{
|
||||
auto result = std::make_shared<symbol_table>();
|
||||
|
Reference in New Issue
Block a user