Symbol

A symbol represents an object with semantic code information.

Constructors

this
this(SYM sid, Identifier* name, SLoc loc)

Constructs a Symbol object.

Members

Functions

getFQN
cstring getFQN()
getModule
Symbol getModule()

Returns the module this symbol belongs to or null if orphaned.

getType
Object getType()

Returns the type of this symbol or null if inexistent. The return type is Object to avoid circular imports.

isComplete
bool isComplete()

Returns true if the symbols is complete.

isCompleting
bool isCompleting()

Returns true if the symbol is being completed.

setComplete
void setComplete()

Change the status to Status.Complete.

setCompleting
void setCompleting()

Change the status to Status.Completing.

to
Class to()

Casts the symbol to Class.

toMangle
cstring toMangle()

Returns the mangled name of this symbol.

toString
string toString()

Returns the string representation of this symbol.

Variables

loc
SLoc loc;

For locating a symbol.

name
Identifier* name;

The name of this symbol. If the symbol is nameless Ident.Empty is assigned to it.

parent
Symbol parent;

The parent this symbol belongs to.

sid
SYM sid;

The ID of this symbol.

status
Status status;

The semantic status of this symbol.

Meta