2026-07-25 23:01:18 +02:00
|
|
|
#include "bscript/compiler/ast/InterpolateString.h"
|
2021-03-11 22:48:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "clib/strutil.h"
|
2026-07-25 23:01:18 +02:00
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
2021-03-11 22:48:16 +01:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
InterpolateString::InterpolateString( const SourceLocation& source_location,
|
2024-01-12 06:51:44 +01:00
|
|
|
std::vector<std::unique_ptr<Expression>> children )
|
2021-03-11 22:48:16 +01:00
|
|
|
: Expression( source_location, std::move( children ) )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void InterpolateString::accept( NodeVisitor& visitor )
|
|
|
|
|
{
|
|
|
|
|
visitor.visit_interpolate_string( *this );
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-12 06:51:44 +01:00
|
|
|
void InterpolateString::describe_to( std::string& w ) const
|
2021-03-11 22:48:16 +01:00
|
|
|
{
|
2024-01-12 06:51:44 +01:00
|
|
|
fmt::format_to( std::back_inserter( w ), "interpolate-string ({} parts)", children.size() );
|
2021-03-11 22:48:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|