sun::ast::UsingAST
class · Source (opens in a new tab)
class sun::ast::UsingAST : public sun::ast::ExprASTUsing declaration: using Namespace::name; or using Namespace::*; Also supports: using Module; (imports all from module).
Inherits
- sun::ast::ExprAST (public)
Public Functions
- UsingAST
- dotLabel
- getNamespacePath
- getNamespacePathString
- getTarget
- getType
- isModuleImport
- setModuleImport
- toString
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 overrideReturns 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() constReturns the namespace path stored by this object.
getNamespacePathString
public · function · Source (opens in a new tab)
std::string sun::ast::UsingAST::getNamespacePathString() constGet 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() constReturns the target stored by this object.
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::UsingAST::getType() const overrideReturns 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() constReports 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 overrideReturns 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::namespacePathNo documentation comment.
target
private · variable · Source (opens in a new tab)
std::string sun::ast::UsingAST::targetNo documentation comment.