|
Gyoji Compiler
|
Represents the declaration of a function. More...
#include <tree.hpp>


Public Member Functions | |
| ~FileStatementFunctionDeclaration () | |
| const AccessModifier & | get_access_modifier () const |
| const UnsafeModifier & | get_unsafe_modifier () const |
| const TypeSpecifier & | get_return_type () const |
| const Terminal & | get_name () const |
| const FunctionDefinitionArgList & | get_arguments () const |
Public Member Functions inherited from Gyoji::frontend::ast::SyntaxNode | |
| 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 declaration of a function.
This represents the declaration of a function (i.e. without the body), specifying only the return value, name, and arguments. This represents, for example, a declaration of the form:
public unsafe f32 pow(f32 base, f32 exponent);
| FileStatementFunctionDeclaration::~FileStatementFunctionDeclaration | ( | ) |
Destructor, nothing special.
| const AccessModifier & FileStatementFunctionDeclaration::get_access_modifier | ( | ) | const |
Represents the type of access to the function.
| const FunctionDefinitionArgList & FileStatementFunctionDeclaration::get_arguments | ( | ) | const |
Specifies the list of arguments with names and types for the function.
| const Terminal & FileStatementFunctionDeclaration::get_name | ( | ) | const |
Specifies the name of the function.
| const TypeSpecifier & FileStatementFunctionDeclaration::get_return_type | ( | ) | const |
Specifies the type of the return value of the function. Only valid if !is_destructor().
| const UnsafeModifier & FileStatementFunctionDeclaration::get_unsafe_modifier | ( | ) | const |
Represents a declaration that the function is marked as safe or unsafe.