summaryrefslogtreecommitdiff
path: root/script/core/semantic-tokens.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/semantic-tokens.lua')
-rw-r--r--script/core/semantic-tokens.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua
index 5917a1a3..568bb222 100644
--- a/script/core/semantic-tokens.lua
+++ b/script/core/semantic-tokens.lua
@@ -165,7 +165,11 @@ local Care = util.switch()
-- 5. Class declaration
-- only search this local
if loc.bindDocs then
- for i, doc in ipairs(loc.bindDocs) do
+ for i = #loc.bindDocs, 1, -1 do
+ local doc = loc.bindDocs[i]
+ if doc.type == 'doc.type' then
+ break
+ end
if doc.type == "doc.class" and doc.bindSources then
for _, src in ipairs(doc.bindSources) do
if src == loc then