VapourSynth-llvmexpr
Loading...
Searching...
No Matches
infix2postfix::IfStmt Struct Reference

#include <llvmexpr/frontend/infix2postfix/AST.hpp>

Collaboration diagram for infix2postfix::IfStmt:

Public Member Functions

 IfStmt (std::unique_ptr< Expr > c, std::unique_ptr< Stmt > t, std::unique_ptr< Stmt > e)

Public Attributes

std::unique_ptr< Exprcondition
std::unique_ptr< Stmtthen_branch
std::unique_ptr< Stmtelse_branch
Range range

Detailed Description

Definition at line 166 of file AST.hpp.

Constructor & Destructor Documentation

◆ IfStmt()

infix2postfix::IfStmt::IfStmt ( std::unique_ptr< Expr > c,
std::unique_ptr< Stmt > t,
std::unique_ptr< Stmt > e )
inline

Definition at line 339 of file AST.hpp.

341 : condition(std::move(c)), then_branch(std::move(t)),
342 else_branch(std::move(e)) {
343 if (condition) {
344 range.start = condition->range().start;
345 }
346 if (else_branch) {
347 range.end = else_branch->range().end;
348 } else if (then_branch) {
349 range.end = then_branch->range().end;
350 } else if (condition) {
351 range.end = condition->range().end;
352 }
353}
std::unique_ptr< Expr > condition
Definition AST.hpp:167
std::unique_ptr< Stmt > then_branch
Definition AST.hpp:168
std::unique_ptr< Stmt > else_branch
Definition AST.hpp:169

References condition, else_branch, range, and then_branch.

Member Data Documentation

◆ condition

std::unique_ptr<Expr> infix2postfix::IfStmt::condition

Definition at line 167 of file AST.hpp.

Referenced by IfStmt().

◆ else_branch

std::unique_ptr<Stmt> infix2postfix::IfStmt::else_branch

Definition at line 169 of file AST.hpp.

Referenced by IfStmt().

◆ range

Range infix2postfix::IfStmt::range

Definition at line 170 of file AST.hpp.

Referenced by IfStmt().

◆ then_branch

std::unique_ptr<Stmt> infix2postfix::IfStmt::then_branch

Definition at line 168 of file AST.hpp.

Referenced by IfStmt().


The documentation for this struct was generated from the following file:
  • llvmexpr/frontend/infix2postfix/AST.hpp