Implement CHKVAR
This commit is contained in:
1 parent
d3c4392087
commit
ce71082b29
2 files changed
+22
-1
No files matched your search
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user