Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::FunctionPrototype Class Reference

Represents a function signature. More...

#include <bond/compiler/parsenodes.h>

Inheritance diagram for Bond::FunctionPrototype:
Bond::ParseNode

Public Member Functions

 FunctionPrototype (const Token *name, TypeDescriptor *returnType, Parameter *parameterList, bool isConst)
 Constructs a function prototype.
virtual ~FunctionPrototype ()
virtual void Accept (ParseNodeVisitor &visitor) override
 Dispatches this node to the given visitor.
virtual void Accept (ParseNodeVisitor &visitor) const override
 Dispatches this node to the given visitor.
virtual const TokenGetContextToken () const override
 Returns the token used as source context for diagnostics.
const TokenGetName () const
 Returns the function name token.
TypeDescriptorGetReturnType ()
 Returns the return type descriptor.
const TypeDescriptorGetReturnType () const
 Returns the return type descriptor.
ParameterGetParameterList ()
 Returns the parameter list.
const ParameterGetParameterList () const
 Returns the parameter list.
bool IsConst () const
 Returns true if the function is const-qualified.
Public Member Functions inherited from Bond::ParseNode
virtual ~ParseNode ()

Additional Inherited Members

Protected Member Functions inherited from Bond::ParseNode
 ParseNode ()

Detailed Description

Represents a function signature.

Constructor & Destructor Documentation

◆ FunctionPrototype()

Bond::FunctionPrototype::FunctionPrototype ( const Token * name,
TypeDescriptor * returnType,
Parameter * parameterList,
bool isConst )
inline

Constructs a function prototype.

Parameters
nameFunction name token.
returnTypeFunction return type descriptor.
parameterListFunction parameter list.
isConstTrue if this is a const-qualified member function.

◆ ~FunctionPrototype()

virtual Bond::FunctionPrototype::~FunctionPrototype ( )
inlinevirtual

Member Function Documentation

◆ Accept() [1/2]

virtual void Bond::FunctionPrototype::Accept ( ParseNodeVisitor & visitor) const
inlineoverridevirtual

Dispatches this node to the given visitor.

Parameters
visitorVisitor that handles this node type.

Implements Bond::ParseNode.

◆ Accept() [2/2]

virtual void Bond::FunctionPrototype::Accept ( ParseNodeVisitor & visitor)
inlineoverridevirtual

Dispatches this node to the given visitor.

Parameters
visitorVisitor that handles this node type.

Implements Bond::ParseNode.

◆ GetContextToken()

virtual const Token * Bond::FunctionPrototype::GetContextToken ( ) const
inlineoverridevirtual

Returns the token used as source context for diagnostics.

Returns
A token associated with this node, or null if no token applies.

Implements Bond::ParseNode.

◆ GetName()

const Token * Bond::FunctionPrototype::GetName ( ) const
inline

Returns the function name token.

◆ GetParameterList() [1/2]

Parameter * Bond::FunctionPrototype::GetParameterList ( )
inline

Returns the parameter list.

◆ GetParameterList() [2/2]

const Parameter * Bond::FunctionPrototype::GetParameterList ( ) const
inline

Returns the parameter list.

◆ GetReturnType() [1/2]

TypeDescriptor * Bond::FunctionPrototype::GetReturnType ( )
inline

Returns the return type descriptor.

◆ GetReturnType() [2/2]

const TypeDescriptor * Bond::FunctionPrototype::GetReturnType ( ) const
inline

Returns the return type descriptor.

◆ IsConst()

bool Bond::FunctionPrototype::IsConst ( ) const
inline

Returns true if the function is const-qualified.


The documentation for this class was generated from the following file:
  • include/bond/compiler/parsenodes.h