Skip to content

Commit 72954de

Browse files
committed
update
1 parent 5addb42 commit 72954de

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

script/core/semantic-tokens.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ local Care = util.switch()
104104
modifieres = define.TokenModifiers.declaration,
105105
}
106106
end
107+
if source.attrs then
108+
for _, attr in ipairs(source.attrs) do
109+
results[#results+1] = {
110+
start = attr.start,
111+
finish = attr.finish,
112+
type = define.TokenTypes.typeParameter,
113+
}
114+
end
115+
end
107116
local loc = source.node or source
108117
-- 1. 值为函数的局部变量 | Local variable whose value is a function
109118
if loc.refs then
@@ -220,11 +229,6 @@ local Care = util.switch()
220229
end
221230
end
222231
end
223-
-- 7. 函数调用 | Function call
224-
if source.parent.type == 'call'
225-
and source.parent.node == source then
226-
return
227-
end
228232
local mod
229233
if source.type == 'local' then
230234
mod = define.TokenModifiers.declaration

script/parser/guide.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ local childMap = {
9696
['repeat'] = {'#', 'filter'},
9797
['while'] = {'filter', '#'},
9898
['in'] = {'keys', 'exps', '#'},
99-
['loop'] = {'loc', 'max', 'step', '#'},
99+
['loop'] = {'loc', 'init', 'max', 'step', '#'},
100100
['if'] = {'#'},
101101
['ifblock'] = {'filter', '#'},
102102
['elseifblock'] = {'filter', '#'},

script/parser/newparser.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,6 +2853,7 @@ local function parseLocal()
28532853
name.value = func
28542854
name.vstart = func.start
28552855
name.range = func.finish
2856+
name.locPos = locPos
28562857
func.parent = name
28572858
pushActionIntoCurrentChunk(name)
28582859
return name

0 commit comments

Comments
 (0)