Phasor 3.1.1
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
Public Attributes inherited from Phasor::AST::Node
size_t line = 0
size_t column = 0

Detailed Description

Function Declaration Node.

Definition at line 623 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 635 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 640 of file AST.hpp.

Member Data Documentation

◆ body

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

Definition at line 633 of file AST.hpp.

◆ name

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

Definition at line 625 of file AST.hpp.

◆ params

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

Definition at line 631 of file AST.hpp.

◆ returnType

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

Definition at line 632 of file AST.hpp.


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