sun::ast::LambdaAST
class · Source (opens in a new tab)
class sun::ast::LambdaAST : public sun::ast::ExprASTLambda expression (anonymous function).
Inherits
- sun::ast::ExprAST (public)
Public Functions
- LambdaAST
- clearComputedAnalysis
- declarationIdentity
- dotLabel
- forEachChildSlot
- getBody
- getDeclarationId
- getProto
- getType
- hasBody
- resetAnalysisSession
- setDeclarationId
- toString
LambdaAST
public · function · Source (opens in a new tab)
sun::ast::LambdaAST::LambdaAST(std::unique_ptr< PrototypeAST > Proto, std::unique_ptr< BlockExprAST > Body)Creates this syntax node and takes ownership of any supplied child expressions.
Related: PrototypeAST, BlockExprAST
clearComputedAnalysis
public · function · Source (opens in a new tab)
void sun::ast::LambdaAST::clearComputedAnalysis() const overrideClear body and signature results while retaining identities.
declarationIdentity
public · function · Source (opens in a new tab)
sun::semantic_analysis::DeclarationIdentity & sun::ast::LambdaAST::declarationIdentity() const overrideAccess the identities owned by the prototype.
Related: sun::semantic_analysis::DeclarationIdentity
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::LambdaAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::LambdaAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getBody
public · function · Source (opens in a new tab)
const BlockExprAST & sun::ast::LambdaAST::getBody() constProvides access to the expressions that make up the body.
Related: BlockExprAST
getDeclarationId
public · function · Source (opens in a new tab)
sun::semantic_analysis::DeclarationId sun::ast::LambdaAST::getDeclarationId() const overrideA function and its prototype denote the same declaration.
Related: sun::semantic_analysis::DeclarationId
getProto
public · function · Source (opens in a new tab)
const PrototypeAST & sun::ast::LambdaAST::getProto() constProvides the function signature independently of its body.
Related: PrototypeAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::LambdaAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
hasBody
public · function · Source (opens in a new tab)
bool sun::ast::LambdaAST::hasBody() constReports whether a function body is present rather than just a declaration.
resetAnalysisSession
public · function · Source (opens in a new tab)
void sun::ast::LambdaAST::resetAnalysisSession() const overrideDiscard the function's annotations and its prototype's annotations.
setDeclarationId
public · function · Source (opens in a new tab)
void sun::ast::LambdaAST::setDeclarationId(sun::semantic_analysis::DeclarationId id) const overrideAssign the prototype's declaration identity.
Related: sun::semantic_analysis::DeclarationId
toString
public · function · Source (opens in a new tab)
std::string sun::ast::LambdaAST::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::LambdaAST::BodyNo documentation comment.
Related: BlockExprAST
Proto
private · variable · Source (opens in a new tab)
std::unique_ptr<PrototypeAST> sun::ast::LambdaAST::ProtoNo documentation comment.
Related: PrototypeAST