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

Retry failed macro matching for diagnostics #103898

Merged
merged 7 commits into from
Nov 11, 2022
Merged

Commits on Nov 2, 2022

  1. Configuration menu
    Copy the full SHA
    8d13b2a View commit details
    Browse the repository at this point in the history
  2. Small parser cleanups

    Noratrieb committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    6c47848 View commit details
    Browse the repository at this point in the history
  3. Add Tracker to track matching operations

    This should allow us to collect detailed information without slowing
    down the inital hot path.
    Noratrieb committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    2f8a068 View commit details
    Browse the repository at this point in the history
  4. Factor out matching into try_match_macro

    This moves out the matching part of expansion into a new function. This
    function will try to match the macro and return an error if it failed to
    match. A tracker can be used to get more information about the matching.
    Noratrieb committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    39584b1 View commit details
    Browse the repository at this point in the history
  5. Retry matching with tracking for diagnostics

    For now, we only collect the small info for the `best_failure`, but
    using this tracker, we can easily extend it in the future to track
    things with more performance overhead.
    
    We cannot retry cases where the macro failed with a parser error that
    was emitted already, as that would cause us to emit the same error to
    the user twice.
    Noratrieb committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    5f73eac View commit details
    Browse the repository at this point in the history
  6. Add some debug logs to macro matching

    These were useful while debugging, so I'll leave them here.
    Noratrieb committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    1e21b3c View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Small style improvements

    Noratrieb authored Nov 4, 2022
    Configuration menu
    Copy the full SHA
    ebfa2ab View commit details
    Browse the repository at this point in the history