@@ -179,23 +179,6 @@ can_tok_start_type (TokenId id)
179179 }
180180}
181181
182- /* Returns whether the token id is (or is likely to be) a right angle bracket.
183- * i.e. '>', '>>', '>=' and '>>=' tokens. */
184- inline bool
185- is_right_angle_tok (TokenId id)
186- {
187- switch (id)
188- {
189- case RIGHT_ANGLE:
190- case RIGHT_SHIFT:
191- case GREATER_OR_EQUAL:
192- case RIGHT_SHIFT_EQ:
193- return true ;
194- default :
195- return false ;
196- }
197- }
198-
199182/* HACK-y special handling for skipping a right angle token at the end of
200183 * generic arguments.
201184 * Currently, this replaces the "current token" with one that is identical
@@ -3072,7 +3055,7 @@ Parser<ManagedTokenSource>::parse_generic_params_in_angles ()
30723055 rust_debug (" skipped left angle in generic param" );
30733056
30743057 std::vector<std::unique_ptr<AST::GenericParam>> generic_params
3075- = parse_generic_params (is_right_angle_tok);
3058+ = parse_generic_params (Parse::Utils:: is_right_angle_tok);
30763059
30773060 // DEBUG:
30783061 rust_debug (" finished parsing actual generic params (i.e. inside angles)" );
@@ -3936,7 +3919,7 @@ Parser<ManagedTokenSource>::parse_for_lifetimes ()
39363919
39373920 /* cannot specify end token due to parsing problems with '>' tokens being
39383921 * nested */
3939- params = parse_lifetime_params_objs (is_right_angle_tok);
3922+ params = parse_lifetime_params_objs (Parse::Utils:: is_right_angle_tok);
39403923
39413924 if (!skip_generics_right_angle ())
39423925 {
@@ -6414,7 +6397,7 @@ Parser<ManagedTokenSource>::parse_path_generic_args ()
64146397
64156398 const_TokenPtr t = lexer.peek_token ();
64166399 location_t locus = t->get_locus ();
6417- while (!is_right_angle_tok (t->get_id ()))
6400+ while (!Parse::Utils:: is_right_angle_tok (t->get_id ()))
64186401 {
64196402 auto lifetime = parse_lifetime (false );
64206403 if (!lifetime)
@@ -6441,7 +6424,7 @@ Parser<ManagedTokenSource>::parse_path_generic_args ()
64416424
64426425 // TODO: think of better control structure
64436426 t = lexer.peek_token ();
6444- while (!is_right_angle_tok (t->get_id ()))
6427+ while (!Parse::Utils:: is_right_angle_tok (t->get_id ()))
64456428 {
64466429 // FIXME: Is it fine to break if there is one binding? Can't there be
64476430 // bindings in between types?
@@ -6473,7 +6456,7 @@ Parser<ManagedTokenSource>::parse_path_generic_args ()
64736456
64746457 // TODO: think of better control structure
64756458 t = lexer.peek_token ();
6476- while (!is_right_angle_tok (t->get_id ()))
6459+ while (!Parse::Utils:: is_right_angle_tok (t->get_id ()))
64776460 {
64786461 AST::GenericArgsBinding binding = parse_generic_args_binding ();
64796462 if (binding.is_error ())
0 commit comments