2020-09-06 04:02:37 -07:00
|
|
|
#include "DictionaryInitializer.h"
|
|
|
|
|
|
|
|
|
|
|
2021-02-25 16:53:22 +01:00
|
|
|
#include "bscript/compiler/ast/DictionaryEntry.h"
|
|
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
2020-09-06 04:02:37 -07:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
DictionaryInitializer::DictionaryInitializer(
|
|
|
|
|
const SourceLocation& source_location, std::vector<std::unique_ptr<DictionaryEntry>> entries )
|
|
|
|
|
: Expression( source_location, std::move( entries ) )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DictionaryInitializer::accept( NodeVisitor& visitor )
|
|
|
|
|
{
|
|
|
|
|
visitor.visit_dictionary_initializer( *this );
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-12 06:51:44 +01:00
|
|
|
void DictionaryInitializer::describe_to( std::string& w ) const
|
2020-09-06 04:02:37 -07:00
|
|
|
{
|
2024-01-12 06:51:44 +01:00
|
|
|
w += "dictionary-initializer";
|
2020-09-06 04:02:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|