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

fix(js_parser): correctly parse type arguments in expression #1645

Merged
merged 5 commits into from
Jan 24, 2024

Conversation

ah-yu
Copy link
Contributor

@ah-yu ah-yu commented Jan 23, 2024

Summary

Try to close #1184

When parsing type arguments in an expression, it is necessary to re-scan the closing > token to ensure that it is > rather than other tokens, such as >=

Typescript reference https://github.com/microsoft/TypeScript/blob/2e3b8af85e1f782634349139819151881369e3ea/src/compiler/parser.ts#L6529-L6532

Test Plan

Add a new test case

Copy link

netlify bot commented Jan 23, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit b691ce8
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/65b07bd9603db10008a59bfb
😎 Deploy Preview https://deploy-preview-1645--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: 95 (🟢 up 1 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 A-Website Area: website L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Jan 23, 2024
@ah-yu ah-yu changed the title fix(js_formatter): correctly parse type arguments in expression fix(js_parser): correctly parse type arguments in expression Jan 23, 2024
Copy link

codspeed-hq bot commented Jan 23, 2024

CodSpeed Performance Report

Merging #1645 will not alter performance

Comparing ah-yu:parser_0 (b691ce8) with main (c3fee4e)

Summary

✅ 93 untouched benchmarks

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@ah-yu
Copy link
Contributor Author

ah-yu commented Jan 24, 2024

@Conaclos Thank you for the review! I have addressed the comments in 8b2b4e9

Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

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

Great fix :)

@Conaclos Conaclos merged commit 71163ef into biomejs:main Jan 24, 2024
20 checks passed
@ah-yu ah-yu deleted the parser_0 branch January 24, 2024 09:29
ematipico pushed a commit to DaniGuardiola/biome that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Parser Area: parser A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Parser error with greater/less operators
2 participants