Phasor 2.2.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
Phasor::AST::FunctionDecl Struct Reference

Function Declaration Node. More...

#include <AST.hpp>

Inheritance diagram for Phasor::AST::FunctionDecl:
[legend]
Collaboration diagram for Phasor::AST::FunctionDecl:
[legend]

Classes

struct  Param

Public Member Functions

 FunctionDecl (std::string n, std::vector< Param > p, std::unique_ptr< TypeNode > rt, std::unique_ptr< BlockStmt > b)
void print (int indent=0) const override
Public Member Functions inherited from Phasor::AST::Node
virtual ~Node ()=default

Public Attributes

std::string name
std::vector< Paramparams
std::unique_ptr< TypeNodereturnType
std::unique_ptr< BlockStmtbody

Detailed Description

Function Declaration Node.

Definition at line 579 of file AST.hpp.

Constructor & Destructor Documentation

◆ FunctionDecl()

Phasor::AST::FunctionDecl::FunctionDecl ( std::string n,
std::vector< Param > p,
std::unique_ptr< TypeNode > rt,
std::unique_ptr< BlockStmt > b )
inline

Definition at line 591 of file AST.hpp.

Member Function Documentation

◆ print()

void Phasor::AST::FunctionDecl::print ( int indent = 0) const
inlineoverridevirtual

Implements Phasor::AST::Node.

Definition at line 596 of file AST.hpp.

Member Data Documentation

◆ body

std::unique_ptr<BlockStmt> Phasor::AST::FunctionDecl::body

Definition at line 589 of file AST.hpp.

◆ name

std::string Phasor::AST::FunctionDecl::name

Definition at line 581 of file AST.hpp.

◆ params

std::vector<Param> Phasor::AST::FunctionDecl::params

Definition at line 587 of file AST.hpp.

◆ returnType

std::unique_ptr<TypeNode> Phasor::AST::FunctionDecl::returnType

Definition at line 588 of file AST.hpp.


The documentation for this struct was generated from the following file: