sun::ast::WhileExprAST

sun::ast::WhileExprAST

class · Source (opens in a new tab)

class sun::ast::WhileExprAST : public sun::ast::ExprAST

A loop that repeats its body while its condition is true.

Inherits

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 override

Returns 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) override

Visits 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() const

Provides 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() const

Returns the condition expression.

Related: ExprAST

getType

public · function · Source (opens in a new tab)

ASTNodeType sun::ast::WhileExprAST::getType() const override

Returns 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 override

Returns 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::Body

No documentation comment.

Related: ExprAST

Condition

private · variable · Source (opens in a new tab)

std::unique_ptr<ExprAST> sun::ast::WhileExprAST::Condition

No documentation comment.

Related: ExprAST