polserver/pol-core/bscript/compiler/ast/FunctionBody.cpp
turleypol 1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* 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
2026-07-25 23:01:18 +02:00

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