sun::ast::ThrowExprAST

sun::ast::ThrowExprAST

class · Source (opens in a new tab)

class sun::ast::ThrowExprAST : public sun::ast::ExprAST

Throw expression: throw <expr> Used to throw an error from a function declared with "throws IError".

Inherits

Public Functions

ThrowExprAST

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

sun::ast::ThrowExprAST::ThrowExprAST(std::unique_ptr< ExprAST > expr)

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::ThrowExprAST::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::ThrowExprAST::forEachChildSlot(const ChildSlotFn &fn) override

Visits replaceable child expressions so tree passes can rewrite them in place.

Related: ChildSlotFn

getErrorExpr

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

const ExprAST & sun::ast::ThrowExprAST::getErrorExpr() const

Returns the thrown error expression.

Related: ExprAST

getType

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

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

Returns the syntax-node kind used to dispatch tree visitors.

Related: ASTNodeType

hasErrorExpr

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

bool sun::ast::ThrowExprAST::hasErrorExpr() const

Reports whether this object has error expr.

toString

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

std::string sun::ast::ThrowExprAST::toString() const override

Returns a readable representation for diagnostics and debugging.

Private Fields

errorExpr

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

std::unique_ptr<ExprAST> sun::ast::ThrowExprAST::errorExpr

No documentation comment.

Related: ExprAST