sun::ast::VariableReferenceAST

sun::ast::VariableReferenceAST

class · Source (opens in a new tab)

class sun::ast::VariableReferenceAST : public sun::ast::ExprAST

A reference to a named variable resolved during semantic analysis.

Inherits

Public Functions

VariableReferenceAST

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

sun::ast::VariableReferenceAST::VariableReferenceAST(std::string Name)

Creates this syntax node and takes ownership of any supplied child expressions.

dotLabel

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

std::string sun::ast::VariableReferenceAST::dotLabel() const override

Returns the node label used in syntax-tree graph visualizations.

getName

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

const std::string & sun::ast::VariableReferenceAST::getName() const

Returns the declared name used to identify this object.

getQualifiedName

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

const sun::semantic_analysis::QualifiedName & sun::ast::VariableReferenceAST::getQualifiedName() const

Qualified name (after semantic analysis qualifies it).

Related: sun::semantic_analysis::QualifiedName

getType

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

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

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

Related: ASTNodeType

hasQualifiedName

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

bool sun::ast::VariableReferenceAST::hasQualifiedName() const

Reports whether a name including the enclosing scopes has been assigned.

setQualifiedName

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

void sun::ast::VariableReferenceAST::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::VariableReferenceAST::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::VariableReferenceAST::ensureAnalysis() const override

Override to allocate VariableAnalysis instead of base ExprAnalysis.

Related: VariableAnalysis, ExprAnalysis

Private Functions

varAnalysis

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

VariableAnalysis & sun::ast::VariableReferenceAST::varAnalysis() const

Access as VariableAnalysis.

Related: VariableAnalysis

Private Fields

Name

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

std::string sun::ast::VariableReferenceAST::Name

No documentation comment.