sun::ast::TryCatchAST

sun::ast::TryCatchAST

class · Source (opens in a new tab)

class sun::ast::TryCatchAST : public sun::ast::ExprAST

Runs a protected block and selects the first matching exception family.

Inherits

Public Functions

TryCatchAST

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

sun::ast::TryCatchAST::TryCatchAST(std::unique_ptr< ExprAST > body, std::vector< ExceptionHandler > handlers)

Takes ownership of the protected block and ordered handlers.

Related: ExprAST, ExceptionHandler

dotLabel

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

std::string sun::ast::TryCatchAST::dotLabel() const override

Names the node in syntax-tree visualizations.

forEachChildSlot

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

void sun::ast::TryCatchAST::forEachChildSlot(const ChildSlotFn &fn) override

Visits all child roots, including catch declarations.

Related: ChildSlotFn

getType

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

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

Identifies this node for compiler dispatch.

Related: ASTNodeType

toString

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

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

Describes the protected statement for diagnostics.

Public Fields

body

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

std::unique_ptr<ExprAST> sun::ast::TryCatchAST::body

No documentation comment.

Related: ExprAST

handlers

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

std::vector<ExceptionHandler> sun::ast::TryCatchAST::handlers

No documentation comment.

Related: ExceptionHandler