Skip to content

Commit

Permalink
Resolve formatting
Browse files Browse the repository at this point in the history
Resolve member naming
  • Loading branch information
sewbacca committed Jul 17, 2023
1 parent 0c31e30 commit 76315ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion script/core/code-action.lua
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,8 @@ local function checkMissingRequire(results, uri, start, finish)
end)
end

guide.eachSourceBetween(state.ast, start, finish, function (source)if vm.isUndefinedGlobal(source) then
guide.eachSourceBetween(state.ast, start, finish, function (source)
if vm.isUndefinedGlobal(source) then
addRequires(source[1], source.finish)
end
end)
Expand Down
6 changes: 3 additions & 3 deletions script/vm/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ end
---@return boolean
function vm.isUndefinedGlobal(src)
local node = vm.compileNode(src)
if node._undefined_global == nil then
node._undefined_global = checkIsUndefinedGlobal(src)
if node.undefinedGlobal == nil then
node.undefinedGlobal = checkIsUndefinedGlobal(src)
end
return node._undefined_global
return node.undefinedGlobal
end

---@param source parser.object
Expand Down
2 changes: 1 addition & 1 deletion script/vm/node.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vm.nodeCache = setmetatable({}, util.MODE_K)
---@field [integer] vm.node.object
---@field [vm.node.object] true
---@field fields? table<vm.node|string, vm.node>
---@field _undefined_global boolean?
---@field undefinedGlobal boolean?
local mt = {}
mt.__index = mt
mt.id = 0
Expand Down

0 comments on commit 76315ef

Please sign in to comment.