sun::ast::IfExprAST
class · Source (opens in a new tab)
class sun::ast::IfExprAST : public sun::ast::ExprASTA conditional expression with a condition and alternative branches.
Inherits
- sun::ast::ExprAST (public)
Public Functions
IfExprAST
public · function · Source (opens in a new tab)
sun::ast::IfExprAST::IfExprAST(std::unique_ptr< ExprAST > Cond, std::unique_ptr< ExprAST > Then, std::unique_ptr< ExprAST > Else)Creates this syntax node and takes ownership of any supplied child expressions.
Related: ExprAST
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::IfExprAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
elseSlot
public · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > & sun::ast::IfExprAST::elseSlot()Provides the replaceable slot for the alternative branch.
Related: ExprAST
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::IfExprAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getCond
public · function · Source (opens in a new tab)
ExprAST * sun::ast::IfExprAST::getCond() constReturns the condition expression.
Related: ExprAST
getElse
public · function · Source (opens in a new tab)
ExprAST * sun::ast::IfExprAST::getElse() constReturns the alternative branch.
Related: ExprAST
getThen
public · function · Source (opens in a new tab)
ExprAST * sun::ast::IfExprAST::getThen() constReturns the branch taken when the condition is true.
Related: ExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::IfExprAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
thenSlot
public · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > & sun::ast::IfExprAST::thenSlot()Mutable body slots for LoweringPass block normalization.
Related: ExprAST
toString
public · function · Source (opens in a new tab)
std::string sun::ast::IfExprAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Private Fields
Cond
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::IfExprAST::CondNo documentation comment.
Related: ExprAST
Else
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::IfExprAST::ElseNo documentation comment.
Related: ExprAST
Then
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::IfExprAST::ThenNo documentation comment.
Related: ExprAST