2020-09-08 23:49:04 -07:00
|
|
|
#include "EnumDeclaration.h"
|
|
|
|
|
|
2024-01-16 17:55:42 +01:00
|
|
|
|
2020-09-08 23:49:04 -07:00
|
|
|
#include <utility>
|
|
|
|
|
|
2021-02-25 16:53:22 +01:00
|
|
|
#include "bscript/compiler/ast/Expression.h"
|
|
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
2020-09-08 23:49:04 -07:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
EnumDeclaration::EnumDeclaration( const SourceLocation& source_location, std::string identifier,
|
|
|
|
|
std::vector<std::string> names,
|
|
|
|
|
std::vector<std::unique_ptr<Expression>> expressions )
|
|
|
|
|
: Statement( source_location, std::move( expressions ) ),
|
|
|
|
|
identifier( std::move( identifier ) ),
|
|
|
|
|
names( std::move( names ) )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EnumDeclaration::accept( NodeVisitor& visitor )
|
|
|
|
|
{
|
|
|
|
|
visitor.visit_enum_declaration( *this );
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-12 06:51:44 +01:00
|
|
|
void EnumDeclaration::describe_to( std::string& w ) const
|
2020-09-08 23:49:04 -07:00
|
|
|
{
|
2024-01-12 06:51:44 +01:00
|
|
|
w += "enum-declaration";
|
2020-09-08 23:49:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|