mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* 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
30 lines
No EOL
740 B
C++
30 lines
No EOL
740 B
C++
#include "bscript/compiler/ast/FunctionBody.h"
|
|
|
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
|
#include "bscript/compiler/ast/Statement.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
FunctionBody::FunctionBody( const SourceLocation& source_location,
|
|
std::vector<std::unique_ptr<Statement>> statements )
|
|
: Node( source_location, std::move( statements ) )
|
|
{
|
|
}
|
|
|
|
void FunctionBody::accept( NodeVisitor& visitor )
|
|
{
|
|
visitor.visit_function_body( *this );
|
|
}
|
|
|
|
void FunctionBody::describe_to( std::string& w ) const
|
|
{
|
|
w += "user-function-body";
|
|
}
|
|
|
|
Statement* FunctionBody::last_statement()
|
|
{
|
|
return children.empty() ? nullptr : static_cast<Statement*>( children.back().get() );
|
|
}
|
|
|
|
} // namespace Pol::Bscript::Compiler
|