sun::ast::ForExprAST

sun::ast::ForExprAST

class · Source (opens in a new tab)

class sun::ast::ForExprAST : public sun::ast::ExprAST

A for loop with its initialization, condition, update, and body.

Inherits

Public Functions

ForExprAST

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

sun::ast::ForExprAST::ForExprAST(std::unique_ptr< ExprAST > Init, std::unique_ptr< ExprAST > Condition, std::unique_ptr< ExprAST > Increment, 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::ForExprAST::bodySlot()

Mutable body slot for LoweringPass block normalization.

Related: ExprAST

dotLabel

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

std::string sun::ast::ForExprAST::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::ForExprAST::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::ForExprAST::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::ForExprAST::getCondition() const

Returns the condition expression.

Related: ExprAST

getIncrement

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

const ExprAST * sun::ast::ForExprAST::getIncrement() const

Returns the loop update expression.

Related: ExprAST

getInit

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

const ExprAST * sun::ast::ForExprAST::getInit() const

Returns the loop initialization expression.

Related: ExprAST

getType

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

ASTNodeType sun::ast::ForExprAST::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::ForExprAST::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::ForExprAST::Body

No documentation comment.

Related: ExprAST

Condition

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

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

No documentation comment.

Related: ExprAST

Increment

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

std::unique_ptr<ExprAST> sun::ast::ForExprAST::Increment

No documentation comment.

Related: ExprAST

Init

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

std::unique_ptr<ExprAST> sun::ast::ForExprAST::Init

No documentation comment.

Related: ExprAST