@@ -210,8 +210,8 @@ function _hl_annotations!(highlights::Vector{@NamedTuple{region::UnitRange{Int},
210210 end
211211 end
212212 elseif nkind == K " macrocall" && numchildren (node) >= 2 &&
213- kind (node. args [1 ]) == K " @" && kind (node. args [2 ]) == K " MacroName"
214- region = first (region): first (region)+ node. args [2 ]. span
213+ kind (node[1 ]) == K " @" && kind (node[2 ]) == K " MacroName"
214+ region = first (region): first (region)+ node[2 ]. span
215215 :julia_macro
216216 elseif nkind == K " StringMacroName" ; :julia_macro
217217 elseif nkind == K " CmdMacroName" ; :julia_macro
@@ -223,13 +223,13 @@ function _hl_annotations!(highlights::Vector{@NamedTuple{region::UnitRange{Int},
223223 c -> kind (c) == K " ::" && JuliaSyntax. is_trivia (c),
224224 node. args)
225225 if ! isnothing (literal_typedecl)
226- shift = sum (c -> Int (c. span), node. args [1 : literal_typedecl])
226+ shift = sum (c -> Int (c. span), node[1 : literal_typedecl])
227227 region = first (region)+ shift: last (region)
228228 :julia_type
229229 end
230230 end
231231 elseif nkind == K " quote" && numchildren (node) == 2 &&
232- kind (node. args [1 ]) == K " :" && kind (node. args [2 ]) == K " Identifier"
232+ kind (node[1 ]) == K " :" && kind (node[2 ]) == K " Identifier"
233233 :julia_symbol
234234 elseif nkind == K " Comment" ; :julia_comment
235235 elseif nkind == K " String" ; :julia_string
@@ -263,7 +263,7 @@ function _hl_annotations!(highlights::Vector{@NamedTuple{region::UnitRange{Int},
263263 c -> kind (c) == K " where" && JuliaSyntax. is_trivia (c),
264264 node. args)
265265 if ! isnothing (literal_where)
266- shift = sum (c -> Int (c. span), node. args [1 : literal_where])
266+ shift = sum (c -> Int (c. span), node[1 : literal_where])
267267 region = first (region)+ shift: last (region)
268268 :julia_type
269269 end
@@ -294,10 +294,10 @@ function _hl_annotations!(highlights::Vector{@NamedTuple{region::UnitRange{Int},
294294 name = Symbol (regionstr)
295295 ifelse (name in BUILTIN_FUNCTIONS, :julia_builtin , :julia_funcall )
296296 elseif kind (arg1) == K " ." && numchildren (arg1) == 3 &&
297- kind (arg1. args [end ]) == K " quote" &&
298- numchildren (arg1. args [end ]) == 1 &&
299- kind (arg1. args [end ]. args [1 ]) == K " Identifier"
300- region = first (region)+ argoffset- arg1. args [end ]. args [1 ]. span: first (region)+ argoffset- 1
297+ kind (arg1[end ]) == K " quote" &&
298+ numchildren (arg1[end ]) == 1 &&
299+ kind (arg1[end ][1 ]) == K " Identifier"
300+ region = first (region)+ argoffset- arg1[end ][1 ]. span: first (region)+ argoffset- 1
301301 name = Symbol (regionstr)
302302 ifelse (name in BUILTIN_FUNCTIONS, :julia_builtin , :julia_funcall )
303303 end
0 commit comments