summaryrefslogtreecommitdiff
path: root/script-beta/core/semantic-tokens.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/semantic-tokens.lua')
-rw-r--r--script-beta/core/semantic-tokens.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/script-beta/core/semantic-tokens.lua b/script-beta/core/semantic-tokens.lua
index 8947bd88..2927a295 100644
--- a/script-beta/core/semantic-tokens.lua
+++ b/script-beta/core/semantic-tokens.lua
@@ -126,14 +126,11 @@ return function (uri, start, finish)
local results = {}
local count = 0
- guide.eachSource(ast.ast, function (source)
+ guide.eachSourceBetween(ast.ast, start, finish, function (source)
local method = Care[source.type]
if not method then
return
end
- if source.start > finish or source.finish < start then
- return
- end
method(source, results)
count = count + 1
if count % 100 == 0 then