sun::ast::UsingAST

sun::ast::UsingAST

class · Source (opens in a new tab)

class sun::ast::UsingAST : public sun::ast::ExprAST

Using declaration: using Namespace::name; or using Namespace::*; Also supports: using Module; (imports all from module).

Inherits

Public Functions

UsingAST

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

sun::ast::UsingAST::UsingAST(std::vector< std::string > nsPath, std::string targetName)

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::UsingAST::dotLabel() const override

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

getNamespacePath

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

const std::vector< std::string > & sun::ast::UsingAST::getNamespacePath() const

Returns the namespace path stored by this object.

getNamespacePathString

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

std::string sun::ast::UsingAST::getNamespacePathString() const

Get the full path as string (e.g., "Math.Trig" or "Math::Trig").

getTarget

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

const std::string & sun::ast::UsingAST::getTarget() const

Returns the target stored by this object.

getType

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

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

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

Related: ASTNodeType

isModuleImport

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

bool sun::ast::UsingAST::isModuleImport() const

Reports whether this syntax node represents a module import.

setModuleImport

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

void sun::ast::UsingAST::setModuleImport(bool value)

Record whether semantic binding identified a whole-module import.

toString

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

std::string sun::ast::UsingAST::toString() const override

Returns a readable representation for diagnostics and debugging.

Private Fields

isModuleImport_

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

bool sun::ast::UsingAST::isModuleImport_

No documentation comment.

namespacePath

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

std::vector<std::string> sun::ast::UsingAST::namespacePath

No documentation comment.

target

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

std::string sun::ast::UsingAST::target

No documentation comment.