@@ -31,7 +31,7 @@ function reorder_parameters!(args, params_pos)
3131end
3232
3333function _to_expr (node:: SyntaxNode ; iteration_spec= false , need_linenodes= true ,
34- eq_to_kw= false , inside_vect_or_braces = false )
34+ eq_to_kw= false , map_kw_in_params = false )
3535 if ! haschildren (node)
3636 val = node. val
3737 if val isa Union{Int128,UInt128,BigInt}
@@ -131,8 +131,8 @@ function _to_expr(node::SyntaxNode; iteration_spec=false, need_linenodes=true,
131131 eq_to_kw_in_call =
132132 ((headsym == :call || headsym == :dotcall ) && is_prefix_call (node)) ||
133133 headsym == :ref
134- eq_to_kw_all = headsym == :parameters && ! inside_vect_or_braces
135- in_vb = headsym == :vect || headsym == :braces
134+ eq_to_kw_all = headsym == :parameters && ! map_kw_in_params
135+ in_vbr = headsym == :vect || headsym == :braces || headsym == :ref
136136 if insert_linenums && isempty (node_args)
137137 push! (args, source_location (LineNumberNode, node. source, node. position))
138138 else
@@ -144,7 +144,7 @@ function _to_expr(node::SyntaxNode; iteration_spec=false, need_linenodes=true,
144144 eq_to_kw = eq_to_kw_in_call && i > 1 || eq_to_kw_all
145145 args[insert_linenums ? 2 * i : i] =
146146 _to_expr (n, eq_to_kw= eq_to_kw,
147- inside_vect_or_braces = in_vb )
147+ map_kw_in_params = in_vbr )
148148 end
149149 end
150150 end
0 commit comments