sun::ast::UnsafeBlockAST
class · Source (opens in a new tab)
class sun::ast::UnsafeBlockAST : public sun::ast::ExprASTAllow unsafe operations in a block or a single expression.
Inherits
- sun::ast::ExprAST (public)
Public Functions
UnsafeBlockAST
public · function · Source (opens in a new tab)
sun::ast::UnsafeBlockAST::UnsafeBlockAST(std::unique_ptr< BlockExprAST > b, bool expressionForm=false)Creates this syntax node and takes ownership of any supplied child expressions.
Related: BlockExprAST
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::UnsafeBlockAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::UnsafeBlockAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getBody
getBody()
public · function · Source (opens in a new tab)
BlockExprAST & sun::ast::UnsafeBlockAST::getBody()Provides access to the expressions that make up the body.
Related: BlockExprAST
getBody() const
public · function · Source (opens in a new tab)
const BlockExprAST & sun::ast::UnsafeBlockAST::getBody() constProvides access to the expressions that make up the body.
Related: BlockExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::UnsafeBlockAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
isExpressionForm
public · function · Source (opens in a new tab)
bool sun::ast::UnsafeBlockAST::isExpressionForm() constWhether the source uses a single expression without braces.
toString
public · function · Source (opens in a new tab)
std::string sun::ast::UnsafeBlockAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Private Fields
body
private · variable · Source (opens in a new tab)
std::unique_ptr<BlockExprAST> sun::ast::UnsafeBlockAST::bodyNo documentation comment.
Related: BlockExprAST
expressionForm
private · variable · Source (opens in a new tab)
bool sun::ast::UnsafeBlockAST::expressionFormNo documentation comment.