Added $switch system variable.

This commit is contained in:
arookas 2016-01-29 21:56:49 -05:00
parent c87bad17d7
commit 6292c2f9c5

View file

@ -28,6 +28,9 @@ namespace arookas {
public sunCallableSymbol Float { get; private set; }
public sunCallableSymbol Typeof { get; private set; }
// system variables
public sunStorableSymbol Switch { get; private set; }
public sunContext() {
DataTable = new sunDataTable();
SymbolTable = new sunSymbolTable();
@ -74,6 +77,8 @@ namespace arookas {
Float = AddSystemBuiltin("float");
Typeof = AddSystemBuiltin("typeof");
// add system variables
Switch = AddSystemVariable("$switch"); // storage for switch statements
}
public void Close() {
if (!mOpen) {