sun::ast::CallExprAST
class · Source (opens in a new tab)
class sun::ast::CallExprAST : public sun::ast::ExprASTUnified call expression - callee is any expression that evaluates to a function This handles both direct calls (foo(x)) and indirect calls (myFuncVar(x)).
Inherits
- sun::ast::ExprAST (public)
Inherited by
- sun::ast::BinaryExprAST (public)
Public Functions
- CallExprAST
- dotLabel
- forEachChildSlot
- getArgConversions
- getArgs
- getArgsMutable
- getCallee
- getInitializedFields
- getResolvedArgTypes
- getType
- setArgConversions
- setInitializedFields
- toString
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 overrideReturns 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) overrideVisits 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() constReturns 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() constProvides 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() constReturns 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() constReturns 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() constReturns 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 overrideReturns 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) constHow 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) constRecords 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 overrideReturns a readable representation for diagnostics and debugging.
Protected Functions
ensureAnalysis
protected · function · Source (opens in a new tab)
void sun::ast::CallExprAST::ensureAnalysis() const overrideCreates 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::ArgsNo documentation comment.
Related: ExprAST
Callee
protected · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::CallExprAST::CalleeNo documentation comment.
Related: ExprAST
Private Functions
callAnalysis
private · function · Source (opens in a new tab)
CallAnalysis & sun::ast::CallExprAST::callAnalysis() constAccesses the call resolution and argument conversion annotations.
Related: CallAnalysis