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

chore: reduce redundant lexer methods #2165

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Mar 22, 2024

Summary

I noticed a few methods in the JS lexer that are also present in the generic lexer, so I removed them in favor of the generic one.

Also, there was a tiny duplication now in the current_char_unchecked() method between the JS and Grit lexers, so I moved it to the generic one.

Test Plan

Everything should stay green.

@arendjr arendjr requested a review from ematipico March 22, 2024 15:03
Copy link

netlify bot commented Mar 22, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 99377dc
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/65fd9de13be2b90008a5fd2c
😎 Deploy Preview https://deploy-preview-2165--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 4 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Mar 22, 2024
@arendjr arendjr changed the title Reduce redundant lexer methods chore: reduce redundant lexer methods Mar 22, 2024
Copy link

codspeed-hq bot commented Mar 22, 2024

CodSpeed Performance Report

Merging #2165 will degrade performances by 9.99%

Comparing arendjr:redundant-lexer-functions (99377dc) with main (a7ef325)

Summary

❌ 1 regressions
✅ 92 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main arendjr:redundant-lexer-functions Change
big5-added.json[cached] 2.1 ms 2.4 ms -9.99%

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Nice clean up

@ematipico ematipico merged commit 2edcd59 into biomejs:main Mar 22, 2024
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants