sun::ast::ReturnExprAST
class · Source (opens in a new tab)
class sun::ast::ReturnExprAST : public sun::ast::ExprASTReturn statement: return <expr>;.
Inherits
- sun::ast::ExprAST (public)
Public Functions
- ReturnExprAST
- dotLabel
- forEachChildSlot
- getTargetType
- getType
- getValue
- hasValue
- setTargetType
- toString
ReturnExprAST
public · function · Source (opens in a new tab)
sun::ast::ReturnExprAST::ReturnExprAST(std::unique_ptr< ExprAST > value=nullptr)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::ReturnExprAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::ReturnExprAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getTargetType
public · function · Source (opens in a new tab)
sun::types::TypePtr sun::ast::ReturnExprAST::getTargetType() constReturns the declared return type recorded by semantic analysis.
Related: sun::types::TypePtr
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::ReturnExprAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
getValue
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::ReturnExprAST::getValue() constReturns the value represented by this object.
Related: ExprAST
hasValue
public · function · Source (opens in a new tab)
bool sun::ast::ReturnExprAST::hasValue() constReports whether this object has value.
setTargetType
public · function · Source (opens in a new tab)
void sun::ast::ReturnExprAST::setTargetType(sun::types::TypePtr type)Records the declared return type used to lower ownership conversions.
Related: sun::types::TypePtr
toString
public · function · Source (opens in a new tab)
std::string sun::ast::ReturnExprAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Protected Functions
ensureAnalysis
protected · function · Source (opens in a new tab)
void sun::ast::ReturnExprAST::ensureAnalysis() const overrideAllocates return-specific metadata when analysis first needs it.
Private Fields
Value
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::ReturnExprAST::ValueNo documentation comment.
Related: ExprAST