sun::ast::MemberAssignmentAST
class · Source (opens in a new tab)
class sun::ast::MemberAssignmentAST : public sun::ast::ExprASTMember assignment: object.field = value.
Inherits
- sun::ast::ExprAST (public)
Public Functions
- MemberAssignmentAST
- dotLabel
- fieldWriteKind
- forEachChildSlot
- getMemberName
- getObject
- getQualifiedName
- getType
- getValue
- setFieldWriteKind
- setQualifiedName
- toString
MemberAssignmentAST
public · function · Source (opens in a new tab)
sun::ast::MemberAssignmentAST::MemberAssignmentAST(std::unique_ptr< ExprAST > obj, std::string member, std::unique_ptr< ExprAST > val)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::MemberAssignmentAST::dotLabel() const overrideReturns the node label used in syntax-tree graph visualizations.
fieldWriteKind
public · function · Source (opens in a new tab)
sun::ast::FieldWriteKind sun::ast::MemberAssignmentAST::fieldWriteKind() constReturns whether this field write initializes or replaces its value.
Related: sun::ast::FieldWriteKind
forEachChildSlot
public · function · Source (opens in a new tab)
void sun::ast::MemberAssignmentAST::forEachChildSlot(const ChildSlotFn &fn) overrideVisits replaceable child expressions so tree passes can rewrite them in place.
Related: ChildSlotFn
getMemberName
public · function · Source (opens in a new tab)
const std::string & sun::ast::MemberAssignmentAST::getMemberName() constReturns the member name to resolve on the receiver.
getObject
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::MemberAssignmentAST::getObject() constProvides the receiver expression used for member access.
Related: ExprAST
getQualifiedName
public · function · Source (opens in a new tab)
const sun::semantic_analysis::QualifiedName & sun::ast::MemberAssignmentAST::getQualifiedName() constReturns the declaration name together with its enclosing scopes.
Related: sun::semantic_analysis::QualifiedName
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::MemberAssignmentAST::getType() const overrideReturns the syntax-node kind used to dispatch tree visitors.
Related: ASTNodeType
getValue
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::MemberAssignmentAST::getValue() constReturns the value represented by this object.
Related: ExprAST
setFieldWriteKind
public · function · Source (opens in a new tab)
void sun::ast::MemberAssignmentAST::setFieldWriteKind(sun::ast::FieldWriteKind kind) constWhat becomes of the value the field held before this write: it is dropped, dropped only if the storage is not all zero, or not dropped at all because the field has never held a value.
Set by semantic analysis.
Related: sun::ast::FieldWriteKind
setQualifiedName
public · function · Source (opens in a new tab)
void sun::ast::MemberAssignmentAST::setQualifiedName(sun::semantic_analysis::QualifiedName name) constResolved symbol name for a write to a module global (set by semantic analysis); empty for an ordinary field write.
Related: sun::semantic_analysis::QualifiedName
toString
public · function · Source (opens in a new tab)
std::string sun::ast::MemberAssignmentAST::toString() const overrideReturns a readable representation for diagnostics and debugging.
Protected Functions
ensureAnalysis
protected · function · Source (opens in a new tab)
void sun::ast::MemberAssignmentAST::ensureAnalysis() const overrideCreates the analysis annotations required by this node when first needed.
Private Functions
memberAnalysis
private · function · Source (opens in a new tab)
MemberAccessAnalysis & sun::ast::MemberAssignmentAST::memberAnalysis() constAccesses the resolved member and field-write annotations.
Related: MemberAccessAnalysis
Private Fields
memberName
private · variable · Source (opens in a new tab)
std::string sun::ast::MemberAssignmentAST::memberNameNo documentation comment.
object
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::MemberAssignmentAST::objectNo documentation comment.
Related: ExprAST
value
private · variable · Source (opens in a new tab)
std::unique_ptr<ExprAST> sun::ast::MemberAssignmentAST::valueNo documentation comment.
Related: ExprAST