polserver/pol-core/bscript/compiler/ast/FormatExpression.cpp
turleypol 1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* all except pol

* pol and includes under defines

* something weird has happened

* remove own folder from include searchpath

* fixed remaining, adapted include style for external headers

* missing include
2026-07-25 23:01:18 +02:00

30 lines
826 B
C++

#include "bscript/compiler/ast/FormatExpression.h"
#include "clib/strutil.h"
#include "bscript/compiler/ast/NodeVisitor.h"
#include "bscript/compiler/ast/StringValue.h"
namespace Pol::Bscript::Compiler
{
FormatExpression::FormatExpression( const SourceLocation& source_location,
std::unique_ptr<Expression> expression,
std::unique_ptr<StringValue> format )
: Expression( source_location )
{
children.reserve( 2 );
children.push_back( std::move( expression ) );
children.push_back( std::move( format ) );
}
void FormatExpression::accept( NodeVisitor& visitor )
{
visitor.visit_format_expression( *this );
}
void FormatExpression::describe_to( std::string& w ) const
{
w += "format-expression";
}
} // namespace Pol::Bscript::Compiler