sun::ast::ReferenceCreationAST
class · Source (opens in a new tab)
class sun::ast::ReferenceCreationAST : public sun::ast::ExprASTReference creation: ref x = y (mutable) or const ref x = y (immutable) Creates a reference variable x that points to the address of y.
Inherits
- sun::ast::ExprAST (public)
Public Functions
- ReferenceCreationAST
- dotLabel
- forEachChildSlot
- getName
- getQualifiedName
- getTarget
- getType
- hasQualifiedName
- isMutable
- setQualifiedName
- toString
ReferenceCreationAST
public · function · Source (opens in a new tab)
sun::ast::ReferenceCreationAST::ReferenceCreationAST(std::string name, std::unique_ptr< ExprAST > target, bool isMutable=true, sun::support::Position loc={})Creates this syntax node and takes ownership of any supplied child expressions.
Related: ExprAST, sun::support::Position
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::ReferenceCreationAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::ReferenceCreationAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getName
public · function · Source (opens in a new tab)
const std::string & sun::ast::ReferenceCreationAST::getName() constReturns the declared name used to identify this object.
getQualifiedName
public · function · Source (opens in a new tab)
const sun::semantic_analysis::QualifiedName & sun::ast::ReferenceCreationAST::getQualifiedName() constQualified name (after semantic analysis qualifies it).
Related: sun::semantic_analysis::QualifiedName
getTarget
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::ReferenceCreationAST::getTarget() constReturns the target stored by this object.
Related: ExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::ReferenceCreationAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
hasQualifiedName
public · function · Source (opens in a new tab)
bool sun::ast::ReferenceCreationAST::hasQualifiedName() constReports whether a name including the enclosing scopes has been assigned.
isMutable
public · function · Source (opens in a new tab)
bool sun::ast::ReferenceCreationAST::isMutable() constReports whether the loan grants exclusive write access to its target.
setQualifiedName
public · function · Source (opens in a new tab)
void sun::ast::ReferenceCreationAST::setQualifiedName(sun::semantic_analysis::QualifiedName qname)Records the declaration name together with its enclosing scopes.
Related: sun::semantic_analysis::QualifiedName
toString
public · function · Source (opens in a new tab)
std::string sun::ast::ReferenceCreationAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Protected Functions
ensureAnalysis
protected · function · Source (opens in a new tab)
void sun::ast::ReferenceCreationAST::ensureAnalysis() const overrideOverride to allocate VariableAnalysis instead of base ExprAnalysis.
Related: VariableAnalysis, ExprAnalysis
Private Functions
varAnalysis
private · function · Source (opens in a new tab)
VariableAnalysis & sun::ast::ReferenceCreationAST::varAnalysis() constAccess as VariableAnalysis.
Related: VariableAnalysis
Private Fields
mutable_
private · variable · Source (opens in a new tab)
bool sun::ast::ReferenceCreationAST::mutable_No documentation comment.
name
private · variable · Source (opens in a new tab)
std::string sun::ast::ReferenceCreationAST::nameNo documentation comment.
target
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::ReferenceCreationAST::targetNo documentation comment.
Related: ExprAST