sun::ast::TryCatchAST
class · Source (opens in a new tab)
class sun::ast::TryCatchAST : public sun::ast::ExprASTRuns a protected block and selects the first matching exception family.
Inherits
- sun::ast::ExprAST (public)
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 overrideNames the node in syntax-tree visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::TryCatchAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits all child roots, including catch declarations.
Related: ChildSlotFn
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::TryCatchAST::getType() const overrideIdentifies this node for compiler dispatch.
Related: ASTNodeType
toString
public · function · Source (opens in a new tab)
std::string sun::ast::TryCatchAST::toString() const overrideDescribes the protected statement for diagnostics.
Public Fields
body
public · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::TryCatchAST::bodyNo documentation comment.
Related: ExprAST
handlers
public · variable · Source (opens in a new tab)
std::vector<ExceptionHandler> sun::ast::TryCatchAST::handlersNo documentation comment.
Related: ExceptionHandler