sun::ast::LambdaAST

sun::ast::LambdaAST

class · Source (opens in a new tab)

class sun::ast::LambdaAST : public sun::ast::ExprAST

Lambda expression (anonymous function).

Inherits

Public Functions

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 override

Clear 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 override

Access 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 override

Returns 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) override

Visits 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() const

Provides 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 override

A 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() const

Provides the function signature independently of its body.

Related: PrototypeAST

getType

public · function · Source (opens in a new tab)

ASTNodeType sun::ast::LambdaAST::getType() const override

Returns 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() const

Reports 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 override

Discard 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 override

Assign 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 override

Returns 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::Body

No documentation comment.

Related: BlockExprAST

Proto

private · variable · Source (opens in a new tab)

std::unique_ptr<PrototypeAST> sun::ast::LambdaAST::Proto

No documentation comment.

Related: PrototypeAST