Gyoji Compiler
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Gyoji::frontend::tree::FileStatementFunctionDeclaration Class Reference

Represents the declaration of a function. More...

#include <tree.hpp>

Inheritance diagram for Gyoji::frontend::tree::FileStatementFunctionDeclaration:
Inheritance graph
[legend]
Collaboration diagram for Gyoji::frontend::tree::FileStatementFunctionDeclaration:
Collaboration graph
[legend]

Public Member Functions

 ~FileStatementFunctionDeclaration ()
 
const AccessModifierget_access_modifier () const
 
const UnsafeModifierget_unsafe_modifier () const
 
const TypeSpecifierget_return_type () const
 
const Terminalget_name () const
 
const FunctionDefinitionArgListget_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 SyntaxNodeget_syntax_node () const
 
const Gyoji::context::SourceReferenceget_source_ref () const
 

Detailed Description

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);

Constructor & Destructor Documentation

◆ ~FileStatementFunctionDeclaration()

FileStatementFunctionDeclaration::~FileStatementFunctionDeclaration ( )

Destructor, nothing special.

Member Function Documentation

◆ get_access_modifier()

const AccessModifier & FileStatementFunctionDeclaration::get_access_modifier ( ) const

Represents the type of access to the function.

◆ get_arguments()

const FunctionDefinitionArgList & FileStatementFunctionDeclaration::get_arguments ( ) const

Specifies the list of arguments with names and types for the function.

◆ get_name()

const Terminal & FileStatementFunctionDeclaration::get_name ( ) const

Specifies the name of the function.

◆ get_return_type()

const TypeSpecifier & FileStatementFunctionDeclaration::get_return_type ( ) const

Specifies the type of the return value of the function.

◆ get_unsafe_modifier()

const UnsafeModifier & FileStatementFunctionDeclaration::get_unsafe_modifier ( ) const

Represents a declaration that the function is marked as safe or unsafe.


The documentation for this class was generated from the following files: