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

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

Collaboration diagram for infix2postfix::TernaryExpr:

Public Member Functions

 TernaryExpr (std::unique_ptr< Expr > c, std::unique_ptr< Expr > t, std::unique_ptr< Expr > f)

Public Attributes

std::unique_ptr< Exprcond
std::unique_ptr< Exprtrue_expr
std::unique_ptr< Exprfalse_expr
Range range

Detailed Description

Definition at line 75 of file AST.hpp.

Constructor & Destructor Documentation

◆ TernaryExpr()

infix2postfix::TernaryExpr::TernaryExpr ( std::unique_ptr< Expr > c,
std::unique_ptr< Expr > t,
std::unique_ptr< Expr > f )
inline

Definition at line 298 of file AST.hpp.

301 : cond(std::move(c)), true_expr(std::move(t)), false_expr(std::move(f)) {
302 if (cond) {
303 range.start = cond->range().start;
304 }
305 if (false_expr) {
306 range.end = false_expr->range().end;
307 } else if (true_expr) {
308 range.end = true_expr->range().end;
309 } else if (cond) {
310 range.end = cond->range().end;
311 }
312}
std::unique_ptr< Expr > cond
Definition AST.hpp:76
std::unique_ptr< Expr > true_expr
Definition AST.hpp:77
std::unique_ptr< Expr > false_expr
Definition AST.hpp:78

References cond, false_expr, range, and true_expr.

Member Data Documentation

◆ cond

std::unique_ptr<Expr> infix2postfix::TernaryExpr::cond

Definition at line 76 of file AST.hpp.

Referenced by TernaryExpr().

◆ false_expr

std::unique_ptr<Expr> infix2postfix::TernaryExpr::false_expr

Definition at line 78 of file AST.hpp.

Referenced by TernaryExpr().

◆ range

Range infix2postfix::TernaryExpr::range

Definition at line 79 of file AST.hpp.

Referenced by TernaryExpr().

◆ true_expr

std::unique_ptr<Expr> infix2postfix::TernaryExpr::true_expr

Definition at line 77 of file AST.hpp.

Referenced by TernaryExpr().


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