diff options
Diffstat (limited to 'server/src/core/definition.lua')
-rw-r--r-- | server/src/core/definition.lua | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua index f6440e81..f096fb99 100644 --- a/server/src/core/definition.lua +++ b/server/src/core/definition.lua @@ -13,10 +13,17 @@ local function parseValueSimily(callback, vm, source) if other[1] == key and not other:bindLocal() and other:bindValue() - and other:action() == 'set' and source:bindValue() ~= other:bindValue() then - callback(other) + if Mode == 'definition' then + if other:action() == 'set' then + callback(other) + end + elseif Mode == 'reference' then + if other:action() == 'set' or other:action() == 'get' then + callback(other) + end + end end :: CONTINUE :: end) @@ -191,7 +198,6 @@ return function (vm, pos, mode) end if source:bindValue() then isGlobal = parseValue(callback, vm, source) - --parseValueSimily(callback, vm, source) end if source:bindLabel() then parseLabel(callback, vm, source:bindLabel()) @@ -204,10 +210,14 @@ return function (vm, pos, mode) end if source:get 'in index' then isGlobal = parseValue(callback, vm, source) - --parseValueSimily(callback, vm, source) end if source:get 'target class' then parseClass(callback, vm, source) end + + if #list == 0 then + parseValueSimily(callback, vm, source) + end + return list, isGlobal end |