Rollup merge of #125117 - dev-ardi:improve-parser, r=wesleywiser,fmease

Improve parser

Fixes #124935.

- Add a few more help diagnostics to incorrect semicolons
- Overall improved that function
- Addded a few comments
- Renamed diff_marker fns to git_diff_marker
This commit is contained in:
Matthias Krüger 2024-05-18 18:44:14 +02:00 committed by GitHub
commit f9bf759e83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 81 additions and 70 deletions

View file

@ -684,9 +684,9 @@ pub(crate) fn make_test(
}
}
// The supplied slice is only used for diagnostics,
// The supplied item is only used for diagnostics,
// which are swallowed here anyway.
parser.maybe_consume_incorrect_semicolon(&[]);
parser.maybe_consume_incorrect_semicolon(None);
}
// Reset errors so that they won't be reported as compiler bugs when dropping the