2020-08-24 01:47:38 -07:00
|
|
|
#ifndef POLSERVER_FUNCTIONCALL_H
|
|
|
|
|
#define POLSERVER_FUNCTIONCALL_H
|
|
|
|
|
|
2021-02-25 16:53:22 +01:00
|
|
|
#include "bscript/compiler/ast/Expression.h"
|
2020-08-24 01:47:38 -07:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
class Argument;
|
|
|
|
|
class FunctionLink;
|
|
|
|
|
class ModuleFunctionDeclaration;
|
|
|
|
|
class FunctionParameterDeclaration;
|
|
|
|
|
class UserFunction;
|
|
|
|
|
|
|
|
|
|
class FunctionCall : public Expression
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FunctionCall( const SourceLocation&, std::string scope, std::string name,
|
|
|
|
|
std::vector<std::unique_ptr<Argument>> arguments );
|
|
|
|
|
|
|
|
|
|
void accept( NodeVisitor& visitor ) override;
|
2024-01-12 06:51:44 +01:00
|
|
|
void describe_to( std::string& ) const override;
|
2020-08-24 01:47:38 -07:00
|
|
|
|
|
|
|
|
std::vector<std::unique_ptr<Argument>> take_arguments();
|
|
|
|
|
[[nodiscard]] std::vector<std::reference_wrapper<FunctionParameterDeclaration>> parameters()
|
|
|
|
|
const;
|
|
|
|
|
|
|
|
|
|
const std::shared_ptr<FunctionLink> function_link;
|
|
|
|
|
|
|
|
|
|
const std::string scope;
|
|
|
|
|
const std::string method_name;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // POLSERVER_FUNCTIONCALL_H
|