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

Switch Statement Node. More...

#include <AST.hpp>

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

Public Member Functions

 SwitchStmt (std::unique_ptr< Expression > e, std::vector< CaseClause > c, std::vector< std::unique_ptr< Statement > > d)
void print (int indent=0) const override
Public Member Functions inherited from Phasor::AST::Node
virtual ~Node ()=default

Public Attributes

std::unique_ptr< Expressionexpr
std::vector< CaseClausecases
std::vector< std::unique_ptr< Statement > > defaultStmts

Detailed Description

Switch Statement Node.

Definition at line 699 of file AST.hpp.

Constructor & Destructor Documentation

◆ SwitchStmt()

Phasor::AST::SwitchStmt::SwitchStmt ( std::unique_ptr< Expression > e,
std::vector< CaseClause > c,
std::vector< std::unique_ptr< Statement > > d )
inline

Definition at line 705 of file AST.hpp.

Member Function Documentation

◆ print()

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

Implements Phasor::AST::Node.

Definition at line 710 of file AST.hpp.

Member Data Documentation

◆ cases

std::vector<CaseClause> Phasor::AST::SwitchStmt::cases

Definition at line 702 of file AST.hpp.

◆ defaultStmts

std::vector<std::unique_ptr<Statement> > Phasor::AST::SwitchStmt::defaultStmts

Definition at line 703 of file AST.hpp.

◆ expr

std::unique_ptr<Expression> Phasor::AST::SwitchStmt::expr

Definition at line 701 of file AST.hpp.


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