mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Update grammar * update prettifier * Update semantic analysis - Move checks for 'super' and non-static to semantic analyzer - Add checks for byref and default * Add, update tests * update escript guide, add tests for examples in guide * update core-changes * Address Discord comments - Update core-changes to explicitly talk about default parameters
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#ifndef POLSERVER_FUNCTIONPARAMETERDECLARATION_H
|
|
#define POLSERVER_FUNCTIONPARAMETERDECLARATION_H
|
|
|
|
#include "bscript/compiler/ast/Node.h"
|
|
#include "bscript/compiler/model/ScopableName.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
class NodeVisitor;
|
|
class Expression;
|
|
|
|
class FunctionParameterDeclaration : public Node
|
|
{
|
|
public:
|
|
FunctionParameterDeclaration( const SourceLocation& source_location, ScopableName name,
|
|
bool byref, bool unused, bool uninit_default, bool rest,
|
|
std::unique_ptr<Expression> default_value );
|
|
FunctionParameterDeclaration( const SourceLocation& source_location, ScopableName name,
|
|
bool byref, bool unused, bool uninit_default, bool rest );
|
|
|
|
void accept( NodeVisitor& visitor ) override;
|
|
void describe_to( std::string& ) const override;
|
|
|
|
Expression* default_value();
|
|
|
|
const ScopableName name;
|
|
const bool byref;
|
|
const bool unused;
|
|
const bool uninit_default;
|
|
const bool rest;
|
|
};
|
|
|
|
} // namespace Pol::Bscript::Compiler
|
|
|
|
|
|
#endif // POLSERVER_FUNCTIONPARAMETERDECLARATION_H
|