1
0

Implement CHKVAR

This commit is contained in:
otya128
2016-12-24 19:34:48 +09:00
parent d3c4392087
commit ce71082b29
2 changed files with 22 additions and 1 deletions

View File

@@ -319,6 +319,22 @@ class VM
return true;
return false;
}
bool chklabel(wstring label)
{
if (label in currentSlot.globalLabel)
return true;
if (currentFunction && label in currentFunction.label)
return true;
return false;
}
bool chkvar(wstring var)
{
if (var in currentSlot.globalTable)
return true;
if (currentFunction && var in currentFunction.variable)
return true;
return false;
}
}
enum CodeType
{