Method | Description | |
---|---|---|
GetSymbols ( ) : |
||
ToString ( ) : string |
Dump all the variables in all the scopes into a human readable string for debugging
|
|
add ( string name ) : void |
Cache a variable's name, until the type is known, at which point call commit
|
|
add ( string name, int value ) : void |
Cache a constant until a commit call to commit all cached constants
|
|
addType ( string name, int startIndex, int endIndex ) : void |
Add an array type to the current scope, to be used as a possible type of future variables. Note: Not that great of an idea. This needs to be subclassed and organized so variables can have more dynamic types
|
|
commit ( ) : void |
When finished declaring variable or constant integers, add them to the current scope Clear the cached variables afterwards
|
|
commitTypedVar ( |
When a type is declared after any number of variables have been added, set all cached variables to that type and add them to the current scope. The type is always an array. Clear the cached variables afterwards
|
|
get ( string name ) : Attribute |
Get a non-var attribute, by name, in the nearest scope possible If no variable is named such, return null
|
|
getOffset ( string name ) : int |
Get the Attribute for a variable, by name, in the nearest scope possible. If no variable is named such, return null. It may be nested, in which case the nestedOffset will have the proper offset to add to the normal variable's own offset within its own scope
|
|
init ( ) : void |
Initialize symbol system for fresh use
|
|
nest ( ) : void |
Create a new scope
|
|
setVal ( string name, int value ) : void |
Set a variable's value, using the variable, by name, in the closest scope If no such named variable exists, nothing is changed
|
|
unnest ( ) : void |
Destroy the latest scope
|
Method | Description | |
---|---|---|
Symbols ( ) : System |
public addType ( string name, int startIndex, int endIndex ) : void | ||
name | string | |
startIndex | int | |
endIndex | int | |
return | void |
public commitTypedVar ( |
||
type | ||
return | void |
public setVal ( string name, int value ) : void | ||
name | string | |
value | int | |
return | void |