sun::ast::ParenExprAST
class · Source (opens in a new tab)
class sun::ast::ParenExprAST : public sun::ast::ExprASTGrouping parentheses: (expr).
Preserved by the parser for a lossless parse tree; the lowering pass unwraps it before semantic analysis, so it never reaches the borrow checker or codegen.
Inherits
- sun::ast::ExprAST (public)
Public Functions
ParenExprAST
public · function · Source (opens in a new tab)
sun::ast::ParenExprAST::ParenExprAST(std::unique_ptr< ExprAST > inner)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::ParenExprAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::ParenExprAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getInner
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::ParenExprAST::getInner() constReturns the enclosed expression.
Related: ExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::ParenExprAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
takeInner
public · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::ast::ParenExprAST::takeInner()Used by the lowering pass to unwrap the node.
Related: ExprAST
toString
public · function · Source (opens in a new tab)
std::string sun::ast::ParenExprAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Private Fields
inner_
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::ParenExprAST::inner_No documentation comment.
Related: ExprAST