polserver/pol-core/bscript/compiler/ast/FormatExpression.cpp
turleypol d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00

30 lines
789 B
C++

#include "FormatExpression.h"
#include "clib/strutil.h"
#include "compiler/ast/NodeVisitor.h"
#include "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