Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_tt cleanups #94547

Merged
merged 5 commits into from
Mar 4, 2022
Merged

parse_tt cleanups #94547

merged 5 commits into from
Mar 4, 2022

Commits on Mar 3, 2022

  1. Improve if/else formatting in macro_parser.rs.

    To avoid the strange style where comments force `else` onto its own
    line.
    
    The commit also removes several else-after-return constructs, which can
    be hard to read.
    nnethercote committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    11c565f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b9fabc3 View commit details
    Browse the repository at this point in the history
  3. Introduce MatcherPosRepetition.

    There are three `Option` fields in `MatcherPos` that are only used in
    tandem. This commit combines them, making the code slightly easier to
    read. (It also makes clear that the `sep` field arguably should have
    been `Option<Option<Token>>`!)
    nnethercote committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    643ba50 View commit details
    Browse the repository at this point in the history
  4. Use a better return type for inner_parse_loop.

    Because `inner_parse_loop` has only one way to not succeed, not three.
    nnethercote committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    e5f3fd6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    97eb1b4 View commit details
    Browse the repository at this point in the history