Gyoji Compiler
|
Represents the list of arguments to a function definition. More...
#include <tree.hpp>
Public Member Functions | |
~FunctionDefinitionArgList () | |
const std::vector< Gyoji::owned< FunctionDefinitionArg > > & | get_arguments () const |
void | add_argument (Gyoji::owned< FunctionDefinitionArg > _argument) |
void | add_comma (Gyoji::owned< Terminal > _comma) |
![]() | |
SyntaxNode (Gyoji::context::TokenID _type, specific_type_t _data, const Gyoji::context::SourceReference &_source_ref) | |
const std::vector< std::reference_wrapper< const SyntaxNode > > & | get_children () const |
const Gyoji::context::TokenID & | get_type () const |
template<class T > | |
bool | has_data () const |
template<class T > | |
const T & | get_data () const |
const SyntaxNode & | get_syntax_node () const |
const Gyoji::context::SourceReference & | get_source_ref () const |
Represents the list of arguments to a function definition.
This represents a list of argumnents to a function. The input syntax consists of a comma-separated list of arguments of type FunctionDefinitionArg.
FunctionDefinitionArgList::~FunctionDefinitionArgList | ( | ) |
Destructor, nothing special.
void FunctionDefinitionArgList::add_argument | ( | Gyoji::owned< FunctionDefinitionArg > | _argument | ) |
Adds a single argument to the function, used during the parse stage to construct the function arguments from the input syntax.
void FunctionDefinitionArgList::add_comma | ( | Gyoji::owned< Terminal > | _comma | ) |
Adds the comma separator to the function arguments, but this plays no role in the semantics.
const std::vector< Gyoji::owned< FunctionDefinitionArg > > & FunctionDefinitionArgList::get_arguments | ( | ) | const |
Returns the list of arguments to the function.