sun::ast::WhileExprAST
class · Source (opens in a new tab)
class sun::ast::WhileExprAST : public sun::ast::ExprASTA loop that repeats its body while its condition is true.
Inherits
- sun::ast::ExprAST (public)
Public Functions
WhileExprAST
public · function · Source (opens in a new tab)
sun::ast::WhileExprAST::WhileExprAST(std::unique_ptr< ExprAST > Condition, std::unique_ptr< ExprAST > Body)Creates this syntax node and takes ownership of any supplied child expressions.
Related: ExprAST
bodySlot
public · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > & sun::ast::WhileExprAST::bodySlot()Mutable body slot for LoweringPass block normalization.
Related: ExprAST
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::WhileExprAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::WhileExprAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getBody
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::WhileExprAST::getBody() constProvides access to the expressions that make up the body.
Related: ExprAST
getCondition
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::WhileExprAST::getCondition() constReturns the condition expression.
Related: ExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::WhileExprAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
toString
public · function · Source (opens in a new tab)
std::string sun::ast::WhileExprAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Private Fields
Body
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::WhileExprAST::BodyNo documentation comment.
Related: ExprAST
Condition
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::WhileExprAST::ConditionNo documentation comment.
Related: ExprAST