mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* 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
30 lines
789 B
C++
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
|