sun::ast::MemberAssignmentAST

sun::ast::MemberAssignmentAST

class · Source (opens in a new tab)

class sun::ast::MemberAssignmentAST : public sun::ast::ExprAST

Member assignment: object.field = value.

Inherits

Public Functions

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 override

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

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

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

Returns the member name to resolve on the receiver.

getObject

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

const ExprAST * sun::ast::MemberAssignmentAST::getObject() const

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

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

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

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

What 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) const

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

Returns a readable representation for diagnostics and debugging.

Protected Functions

ensureAnalysis

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

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

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

Accesses 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::memberName

No documentation comment.

object

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

std::unique_ptr<ExprAST> sun::ast::MemberAssignmentAST::object

No documentation comment.

Related: ExprAST

value

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

std::unique_ptr<ExprAST> sun::ast::MemberAssignmentAST::value

No documentation comment.

Related: ExprAST