Skip to content

re-order enums in grammar#1074

Merged
OmarTawfik merged 1 commit intomainfrom
enum-parse-order
Aug 16, 2024
Merged

re-order enums in grammar#1074
OmarTawfik merged 1 commit intomainfrom
enum-parse-order

Conversation

@OmarTawfik
Copy link
Copy Markdown
Contributor

@OmarTawfik OmarTawfik commented Aug 12, 2024

To achieve two goals:

  • We attempt variants that can be identified using the first token, before trying variants that will fail after multiple ones are scanned correctly, and wasting time on expensive backtracking.
  • We attempt more correct/idiomatic variants first, before attempting deprecated/less common variants.

This resulted in the following improvements to perf metrics:

Slang - Bencher

Slang - Bencher

Slang - Bencher

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 12, 2024

⚠️ No Changeset found

Latest commit: c2327a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@OmarTawfik OmarTawfik linked an issue Aug 12, 2024 that may be closed by this pull request
@OmarTawfik OmarTawfik marked this pull request as ready for review August 14, 2024 16:47
@OmarTawfik OmarTawfik requested a review from a team as a code owner August 14, 2024 16:47
@OmarTawfik OmarTawfik enabled auto-merge August 14, 2024 16:47
@OmarTawfik OmarTawfik added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit 05dd100 Aug 16, 2024
@OmarTawfik OmarTawfik deleted the enum-parse-order branch August 16, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ordering of parsing statements variants

2 participants