sun::ast::TryCatchExprAST
class · Source (opens in a new tab)
class sun::ast::TryCatchExprAST : public sun::ast::ExprASTTry-catch expression: try { ... } catch (e: ref A) { ... } catch (e: ref IError) { ... } Supports multiple typed catch handlers, tested in source order.
Inherits
- sun::ast::ExprAST (public)
Public Functions
- TryCatchExprAST
- dotLabel
- forEachChildSlot
- getCatchClauses
- getCatchClausesMutable
- getTryBlock
- getType
- toString
TryCatchExprAST
public · function · Source (opens in a new tab)
sun::ast::TryCatchExprAST::TryCatchExprAST(std::unique_ptr< BlockExprAST > tryBlk, std::vector< CatchClause > catchCls)Creates this syntax node and takes ownership of any supplied child expressions.
Related: BlockExprAST, CatchClause
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::TryCatchExprAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::TryCatchExprAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getCatchClauses
public · function · Source (opens in a new tab)
const std::vector< CatchClause > & sun::ast::TryCatchExprAST::getCatchClauses() constReturns the catch clauses stored by this object.
Related: CatchClause
getCatchClausesMutable
public · function · Source (opens in a new tab)
std::vector< CatchClause > & sun::ast::TryCatchExprAST::getCatchClausesMutable()Returns the catch clauses mutable stored by this object.
Related: CatchClause
getTryBlock
public · function · Source (opens in a new tab)
const BlockExprAST & sun::ast::TryCatchExprAST::getTryBlock() constReturns the try block stored by this object.
Related: BlockExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::TryCatchExprAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
toString
public · function · Source (opens in a new tab)
std::string sun::ast::TryCatchExprAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Private Fields
catchClauses
private · variable · Source (opens in a new tab)
std::vector<CatchClause> sun::ast::TryCatchExprAST::catchClausesNo documentation comment.
Related: CatchClause
tryBlock
private · variable · Source (opens in a new tab)
std::unique_ptr<BlockExprAST> sun::ast::TryCatchExprAST::tryBlockNo documentation comment.
Related: BlockExprAST