polserver/pol-core/bscript/compiler/ast/VarStatement.h
turleypol 0e675c516a
use new formatter for ERROR_PRINT, added ERROR_PRINTLN (#595)
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN

* remove old log define

* fix comments
2024-01-12 06:51:44 +01:00

30 lines
785 B
C++

#ifndef POLSERVER_VARSTATEMENT_H
#define POLSERVER_VARSTATEMENT_H
#include "bscript/compiler/ast/Statement.h"
namespace Pol::Bscript::Compiler
{
class NodeVisitor;
class Expression;
class Variable;
class VarStatement : public Statement
{
public:
VarStatement( const SourceLocation&, std::string name, std::unique_ptr<Expression> initializer );
VarStatement( const SourceLocation&, std::string name );
VarStatement( const SourceLocation&, std::string name, bool initialize_as_empty_array );
void accept( NodeVisitor& ) override;
void describe_to( std::string& ) const override;
const std::string name;
const bool initialize_as_empty_array = false;
std::shared_ptr<Variable> variable;
};
} // namespace Pol::Bscript::Compiler
#endif // POLSERVER_VARSTATEMENT_H