@@ -1186,7 +1186,6 @@ function parse_unary_call(ps::ParseState)
1186
1186
parse_brackets (ps, K " )" ) do had_commas, had_splat, num_semis, num_subexprs
1187
1187
is_call[] = had_commas || had_splat || initial_semi
1188
1188
is_block[] = ! is_call[] && num_semis > 0
1189
- bump_closing_token (ps, K " )" )
1190
1189
return (needs_parameters= is_call[],
1191
1190
eq_is_kw_before_semi= is_call[],
1192
1191
eq_is_kw_after_semi= is_call[])
@@ -2009,8 +2008,7 @@ function parse_function(ps::ParseState)
2009
2008
# producing less consistent syntax for anonymous functions.
2010
2009
is_anon_func_ = Ref (is_anon_func)
2011
2010
parse_brackets (ps, K " )" ) do _, _, _, _
2012
- bump_closing_token (ps, K " )" )
2013
- is_anon_func_[] = peek (ps) != K " ("
2011
+ is_anon_func_[] = peek (ps, 2 ) != K " ("
2014
2012
return (needs_parameters = is_anon_func_[],
2015
2013
eq_is_kw_before_semi = is_anon_func_[],
2016
2014
eq_is_kw_after_semi = is_anon_func_[])
@@ -2491,7 +2489,6 @@ function parse_call_arglist(ps::ParseState, closer, is_macrocall)
2491
2489
ps = ParseState (ps, for_generator= true )
2492
2490
2493
2491
parse_brackets (ps, closer) do _, _, _, _
2494
- bump_closing_token (ps, closer)
2495
2492
return (needs_parameters= true ,
2496
2493
eq_is_kw_before_semi= ! is_macrocall,
2497
2494
eq_is_kw_after_semi= true )
@@ -2510,7 +2507,6 @@ function parse_vect(ps::ParseState, closer)
2510
2507
# [x=1, y=2] ==> (vect (= x 1) (= y 2))
2511
2508
# [x=1, ; y=2] ==> (vect (= x 1) (parameters (= y 2)))
2512
2509
parse_brackets (ps, closer) do _, _, _, _
2513
- bump_closing_token (ps, closer)
2514
2510
return (needs_parameters= true ,
2515
2511
eq_is_kw_before_semi= false ,
2516
2512
eq_is_kw_after_semi= false )
@@ -2868,7 +2864,6 @@ function parse_paren(ps::ParseState, check_identifiers=true)
2868
2864
is_tuple[] = had_commas || (had_splat && num_semis >= 1 ) ||
2869
2865
(initial_semi && (num_semis == 1 || num_subexprs > 0 ))
2870
2866
is_block[] = num_semis > 0
2871
- bump_closing_token (ps, K " )" )
2872
2867
return (needs_parameters= is_tuple[],
2873
2868
eq_is_kw_before_semi= false ,
2874
2869
eq_is_kw_after_semi= is_tuple[])
@@ -3023,6 +3018,7 @@ function parse_brackets(after_parse::Function,
3023
3018
end
3024
3019
release_positions (ps. stream, params_marks)
3025
3020
release_positions (ps. stream, eq_positions)
3021
+ bump_closing_token (ps, closing_kind)
3026
3022
end
3027
3023
3028
3024
is_indentation (b:: UInt8 ) = (b == UInt8 (' ' ) || b == UInt8 (' \t ' ))
0 commit comments