@ -696,6 +696,8 @@ function no_spaces_around_x(ctx::Context, node::Node, is_x::F) where {F}
@@ -696,6 +696,8 @@ function no_spaces_around_x(ctx::Context, node::Node, is_x::F) where {F}
pos=position(ctx.fmt_io)
looking_for_x=false
first_x_idx=findfirst(is_x,kids)::Int
last_x_idx=findlast(is_x,kids)::Int
# K"::", K"<:", and K">:" are special cases here since they can be used without an LHS
# in e.g. `f(::Int) = ...` and `Vector{<:Real}`.
@ -705,6 +707,7 @@ function no_spaces_around_x(ctx::Context, node::Node, is_x::F) where {F}
@@ -705,6 +707,7 @@ function no_spaces_around_x(ctx::Context, node::Node, is_x::F) where {F}
@ -715,11 +718,33 @@ function no_spaces_around_x(ctx::Context, node::Node, is_x::F) where {F}
@@ -715,11 +718,33 @@ function no_spaces_around_x(ctx::Context, node::Node, is_x::F) where {F}
end
replace_bytes!(ctx,"",span(kid))
else
@assertkind(kid)!==K"Whitespace"
@assert!JuliaSyntax.is_whitespace(kid)# Filtered out above