2020-08-23 15:01:39 -07:00
|
|
|
#ifndef POLSERVER_FUNCTIONPARAMETERDECLARATION_H
|
|
|
|
|
#define POLSERVER_FUNCTIONPARAMETERDECLARATION_H
|
|
|
|
|
|
2021-02-25 16:53:22 +01:00
|
|
|
#include "bscript/compiler/ast/Node.h"
|
2020-08-23 15:01:39 -07:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
class NodeVisitor;
|
|
|
|
|
class Expression;
|
|
|
|
|
|
|
|
|
|
class FunctionParameterDeclaration : public Node
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FunctionParameterDeclaration( const SourceLocation& source_location, std::string name, bool byref,
|
2024-01-12 06:51:44 +01:00
|
|
|
bool unused, std::unique_ptr<Expression> default_value );
|
2020-08-23 15:01:39 -07:00
|
|
|
FunctionParameterDeclaration( const SourceLocation& source_location, std::string name, bool byref,
|
2024-01-12 06:51:44 +01:00
|
|
|
bool unused );
|
2020-08-23 15:01:39 -07:00
|
|
|
|
|
|
|
|
void accept( NodeVisitor& visitor ) override;
|
2024-01-12 06:51:44 +01:00
|
|
|
void describe_to( std::string& ) const override;
|
2020-08-23 15:01:39 -07:00
|
|
|
|
|
|
|
|
Expression* default_value();
|
|
|
|
|
|
|
|
|
|
const std::string name;
|
|
|
|
|
const bool byref;
|
|
|
|
|
const bool unused;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // POLSERVER_FUNCTIONPARAMETERDECLARATION_H
|