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

Variable Declaration Node. More...

#include <AST.hpp>

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

Public Member Functions

 VarDecl (std::string n, std::unique_ptr< Expression > init)
void print (int indent=0) const override
Public Member Functions inherited from Phasor::AST::Node
virtual ~Node ()=default

Public Attributes

std::string name
std::unique_ptr< Expressioninitializer

Detailed Description

Variable Declaration Node.

Definition at line 374 of file AST.hpp.

Constructor & Destructor Documentation

◆ VarDecl()

Phasor::AST::VarDecl::VarDecl ( std::string n,
std::unique_ptr< Expression > init )
inline

Definition at line 378 of file AST.hpp.

Member Function Documentation

◆ print()

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

Implements Phasor::AST::Node.

Definition at line 381 of file AST.hpp.

Member Data Documentation

◆ initializer

std::unique_ptr<Expression> Phasor::AST::VarDecl::initializer

Definition at line 377 of file AST.hpp.

◆ name

std::string Phasor::AST::VarDecl::name

Definition at line 376 of file AST.hpp.


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