sun::ast::CallExprAST

sun::ast::CallExprAST

class · Source (opens in a new tab)

class sun::ast::CallExprAST : public sun::ast::ExprAST

Unified call expression - callee is any expression that evaluates to a function This handles both direct calls (foo(x)) and indirect calls (myFuncVar(x)).

Inherits

Inherited by

Public Functions

CallExprAST

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

sun::ast::CallExprAST::CallExprAST(std::unique_ptr< ExprAST > Callee, std::vector< std::unique_ptr< ExprAST > > Args)

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::CallExprAST::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::CallExprAST::forEachChildSlot(const ChildSlotFn &fn) override

Visits replaceable child expressions so tree passes can rewrite them in place.

Related: ChildSlotFn

getArgConversions

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

const std::vector< sun::semantic_analysis::ArgConversion > & sun::ast::CallExprAST::getArgConversions() const

Returns the argument conversions selected by analysis.

Related: sun::semantic_analysis::ArgConversion

getArgs

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

const std::vector< std::unique_ptr< ExprAST > > & sun::ast::CallExprAST::getArgs() const

Provides the ordered arguments associated with this expression.

Related: ExprAST

getArgsMutable

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

std::vector< std::unique_ptr< ExprAST > > & sun::ast::CallExprAST::getArgsMutable()

Mutable access to the argument list (used to expand variadic packs into concrete args during semantic analysis).

Related: ExprAST

getCallee

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

const ExprAST * sun::ast::CallExprAST::getCallee() const

Returns the callee stored by this object.

Related: ExprAST

getInitializedFields

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

const std::vector< DeclarationId > & sun::ast::CallExprAST::getInitializedFields() const

Returns fields whose initialization is guaranteed when this call returns.

Related: DeclarationId

getResolvedArgTypes

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

std::vector< sun::types::TypePtr > sun::ast::CallExprAST::getResolvedArgTypes() const

Returns the resolved types of all arguments (for constructor overload resolution).

Related: sun::types::TypePtr

getType

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

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

Returns the syntax-node kind used to dispatch tree visitors.

Related: ASTNodeType

setArgConversions

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

void sun::ast::CallExprAST::setArgConversions(std::vector< sun::semantic_analysis::ArgConversion > conversions) const

How each argument reaches its parameter (set by the semantic analyzer once the callee's signature is known; one entry per argument).

Related: sun::semantic_analysis::ArgConversion

setInitializedFields

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

void sun::ast::CallExprAST::setInitializedFields(std::vector< DeclarationId > fields) const

Records fields initialized by a constructor's call to its own helper.

Related: DeclarationId

toString

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

std::string sun::ast::CallExprAST::toString() const override

Returns a readable representation for diagnostics and debugging.

Protected Functions

ensureAnalysis

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

void sun::ast::CallExprAST::ensureAnalysis() const override

Creates the analysis annotations required by this node when first needed.

Protected Fields

Args

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

std::vector<std::unique_ptr<ExprAST> > sun::ast::CallExprAST::Args

No documentation comment.

Related: ExprAST

Callee

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

std::unique_ptr<ExprAST> sun::ast::CallExprAST::Callee

No documentation comment.

Related: ExprAST

Private Functions

callAnalysis

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

CallAnalysis & sun::ast::CallExprAST::callAnalysis() const

Accesses the call resolution and argument conversion annotations.

Related: CallAnalysis