sun::ast::ThrowExprAST
class · Source (opens in a new tab)
class sun::ast::ThrowExprAST : public sun::ast::ExprASTThrow expression: throw <expr> Used to throw an error from a function declared with "throws IError".
Inherits
- sun::ast::ExprAST (public)
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 overrideReturns 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) overrideVisits 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() constReturns the thrown error expression.
Related: ExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::ThrowExprAST::getType() const overrideReturns 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() constReports whether this object has error expr.
toString
public · function · Source (opens in a new tab)
std::string sun::ast::ThrowExprAST::toString() const overrideReturns 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::errorExprNo documentation comment.
Related: ExprAST