Skip to content

Commit b53c7b8

Browse files
authored
REPL, styling, bracket match: Use a UInt32 for offset (#59853)
1 parent 3a50d6f commit b53c7b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/REPL/src/StylingPasses.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function find_enclosing_parens(content::String, ast, cursor_pos::Int)
124124
innermost_pairs = Dict{Symbol,Tuple{Int,Int}}()
125125
paren_stack = Tuple{Int,Int,Symbol}[] # (open_pos, depth, type)
126126

127-
walk_tree(ast, content, 0) do node, offset
127+
walk_tree(ast, content, UInt32(0)) do node, offset
128128
nkind = JuliaSyntax.kind(node)
129129
pos = firstindex(content) + offset
130130

@@ -151,7 +151,7 @@ function find_enclosing_parens(content::String, ast, cursor_pos::Int)
151151
return collect(values(innermost_pairs))
152152
end
153153

154-
function walk_tree(f::Function, node, content::String, offset::Int)
154+
function walk_tree(f::Function, node, content::String, offset::UInt32)
155155
f(node, offset)
156156

157157
if JuliaSyntax.numchildren(node) > 0

0 commit comments

Comments
 (0)