summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/compile.lua2
-rw-r--r--script/parser/guide.lua4
2 files changed, 4 insertions, 2 deletions
diff --git a/script/parser/compile.lua b/script/parser/compile.lua
index d4129ab4..f9992047 100644
--- a/script/parser/compile.lua
+++ b/script/parser/compile.lua
@@ -12,6 +12,8 @@ local specials = {
['loadfile'] = true,
['pcall'] = true,
['xpcall'] = true,
+ ['pairs'] = true,
+ ['ipairs'] = true,
}
_ENV = nil
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 7a5be591..56f6ac38 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -2206,8 +2206,8 @@ local function getTableAndIndexIfIsForPairsKeyOrValue(ref)
end
local pairsCallObj = rootCallObj.node
- if not pairsCallObj.node or pairsCallObj.node.type ~= 'getglobal'
- or (pairsCallObj.node[1] ~= 'pairs' and pairsCallObj.node[1] ~= 'ipairs') then
+ if not pairsCallObj.node
+ or (pairsCallObj.node.special ~= 'pairs' and pairsCallObj.node.special ~= 'ipairs') then
return
end