mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
25 lines
No EOL
574 B
C++
25 lines
No EOL
574 B
C++
#include "StringValue.h"
|
|
|
|
#include <format/format.h>
|
|
|
|
#include "clib/strutil.h"
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
StringValue::StringValue( const SourceLocation& source_location, std::string value )
|
|
: Value( source_location ), value( std::move( value ) )
|
|
{
|
|
}
|
|
|
|
void StringValue::accept( NodeVisitor& visitor )
|
|
{
|
|
visitor.visit_string_value( *this );
|
|
}
|
|
|
|
void StringValue::describe_to( fmt::Writer& w ) const
|
|
{
|
|
w << "string-value(" << Clib::getencodedquotedstring( value ) << ")";
|
|
}
|
|
|
|
} // namespace Pol::Bscript::Compiler
|