Phasor 3.1.1
Stack VM based Programming Language
Loading...
Searching...
No Matches
Phasor::AST::IfStmt Struct Reference

If Statement Node. More...

#include <AST.hpp>

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

Public Member Functions

 IfStmt (std::unique_ptr< Expression > cond, std::unique_ptr< Statement > thenB, std::unique_ptr< Statement > elseB)
void print (int indent=0) const override
Public Member Functions inherited from Phasor::AST::Node
virtual ~Node ()=default

Public Attributes

std::unique_ptr< Expressioncondition
std::unique_ptr< StatementthenBranch
std::unique_ptr< StatementelseBranch
Public Attributes inherited from Phasor::AST::Node
size_t line = 0
size_t column = 0

Detailed Description

If Statement Node.

Definition at line 538 of file AST.hpp.

Constructor & Destructor Documentation

◆ IfStmt()

Phasor::AST::IfStmt::IfStmt ( std::unique_ptr< Expression > cond,
std::unique_ptr< Statement > thenB,
std::unique_ptr< Statement > elseB )
inline

Definition at line 544 of file AST.hpp.

Member Function Documentation

◆ print()

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

Implements Phasor::AST::Node.

Definition at line 549 of file AST.hpp.

Member Data Documentation

◆ condition

std::unique_ptr<Expression> Phasor::AST::IfStmt::condition

Definition at line 540 of file AST.hpp.

◆ elseBranch

std::unique_ptr<Statement> Phasor::AST::IfStmt::elseBranch

Definition at line 542 of file AST.hpp.

◆ thenBranch

std::unique_ptr<Statement> Phasor::AST::IfStmt::thenBranch

Definition at line 541 of file AST.hpp.


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