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

refactor(parser/html): refactor comments to be nodes in the tree #4056

Conversation

dyc3
Copy link
Contributor

@dyc3 dyc3 commented Sep 23, 2024

Summary

This PR changes how comments are parsed such that they are included in the AST as actual nodes, and not just trivia attached to other nodes.

Fixes #4043 (but not the mismatched formatting)

Test Plan

Snapshots updated, CI should pass.

@github-actions github-actions bot added A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools L-HTML Language: HTML labels Sep 23, 2024
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 48515 48515 0
Passed 47324 47324 0
Failed 1191 1191 0
Panics 0 0 0
Coverage 97.55% 97.55% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6570 6570 0
Passed 2203 2203 0
Failed 4367 4367 0
Panics 0 0 0
Coverage 33.53% 33.53% 0.00%

ts/babel

Test result main count This PR count Difference
Total 680 680 0
Passed 608 608 0
Failed 72 72 0
Panics 0 0 0
Coverage 89.41% 89.41% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18433 18433 0
Passed 14114 14114 0
Failed 4319 4319 0
Panics 0 0 0
Coverage 76.57% 76.57% 0.00%

Copy link

codspeed-hq bot commented Sep 23, 2024

CodSpeed Performance Report

Merging #4056 will improve performances by 6.27%

Comparing 09-22-refactor_parser_html_refactor_comments_to_be_nodes_in_the_tree (c4b4266) with main (a3483e4)

Summary

⚡ 1 improvements
✅ 106 untouched benchmarks

Benchmarks breakdown

Benchmark main 09-22-refactor_parser_html_refactor_comments_to_be_nodes_in_the_tree Change
eucjp_1600564308684076393.json[uncached] 1,023.8 µs 963.4 µs +6.27%

@ematipico ematipico merged commit ecf1f16 into main Sep 24, 2024
16 checks passed
@ematipico ematipico deleted the 09-22-refactor_parser_html_refactor_comments_to_be_nodes_in_the_tree branch September 24, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: internal tools L-HTML Language: HTML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 Formatting HTML removes comment
2 participants