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

[Merged by Bors] - Implement HTML comments and gate behind the annex-b feature #2817

Closed
wants to merge 3 commits into from

Conversation

jedel1043
Copy link
Member

Small steps towards ES5 conformance.

This PR changes the following:

  • Implements HTML comments parsing (<!--, -->).
  • Gates the functionality behind a new annex-b feature for boa_parser.
  • Renames strict_mode to strict to be consistent with Parser::set_strict.

@jedel1043 jedel1043 added enhancement New feature or request parser Issues surrounding the parser labels Apr 13, 2023
@jedel1043 jedel1043 added this to the v0.17.0 milestone Apr 13, 2023
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 94,781 94,781 0
Passed 71,489 71,507 +18
Ignored 17,824 17,824 0
Failed 5,468 5,450 -18
Panics 0 0 0
Conformance 75.43% 75.44% +0.02%
Fixed tests (18):
test/annexB/built-ins/Function/createdynfn-html-open-comment-params.js [strict mode] (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-open-comment-params.js (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-open-comment-body.js [strict mode] (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-open-comment-body.js (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-close-comment-body.js [strict mode] (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-close-comment-body.js (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-close-comment-params.js [strict mode] (previously Failed)
test/annexB/built-ins/Function/createdynfn-html-close-comment-params.js (previously Failed)
test/annexB/language/comments/single-line-html-close-asi.js [strict mode] (previously Failed)
test/annexB/language/comments/single-line-html-close-asi.js (previously Failed)
test/annexB/language/comments/single-line-html-open.js [strict mode] (previously Failed)
test/annexB/language/comments/single-line-html-open.js (previously Failed)
test/annexB/language/comments/single-line-html-close-unicode-separators.js [strict mode] (previously Failed)
test/annexB/language/comments/single-line-html-close-unicode-separators.js (previously Failed)
test/language/module-code/early-strict-mode.js [strict mode] (previously Failed)
test/language/module-code/early-strict-mode.js (previously Failed)
test/language/module-code/parse-err-yield.js [strict mode] (previously Failed)
test/language/module-code/parse-err-yield.js (previously Failed)

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #2817 (3ed574c) into main (2f580bb) will increase coverage by 0.06%.
The diff coverage is 74.01%.

@@            Coverage Diff             @@
##             main    #2817      +/-   ##
==========================================
+ Coverage   51.31%   51.38%   +0.06%     
==========================================
  Files         416      417       +1     
  Lines       41213    41306      +93     
==========================================
+ Hits        21149    21224      +75     
- Misses      20064    20082      +18     
Impacted Files Coverage Δ
boa_engine/src/builtins/function/mod.rs 39.60% <0.00%> (+0.09%) ⬆️
boa_parser/src/lexer/comment.rs 89.74% <ø> (ø)
.../parser/expression/primary/class_expression/mod.rs 0.00% <0.00%> (ø)
boa_parser/src/parser/statement/block/mod.rs 73.52% <0.00%> (ø)
boa_parser/src/parser/statement/switch/mod.rs 75.00% <0.00%> (ø)
...xpression/primary/async_function_expression/mod.rs 60.31% <50.00%> (ø)
...pression/primary/async_generator_expression/mod.rs 59.74% <50.00%> (ø)
...ser/expression/primary/generator_expression/mod.rs 55.55% <50.00%> (ø)
boa_parser/src/parser/mod.rs 41.86% <50.00%> (ø)
boa_parser/src/lexer/mod.rs 79.59% <62.16%> (-6.97%) ⬇️
... and 19 more

... and 39 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Great work!

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

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

Looks very good. I think there are still some tests left that are not passing but let's get this merged and look at those after.

@raskad
Copy link
Member

raskad commented Apr 14, 2023

bors r+

bors bot pushed a commit that referenced this pull request Apr 14, 2023
Small steps towards ES5 conformance.

This PR changes the following:

- Implements HTML comments parsing (`<!--`, `-->`).
- Gates the functionality behind a new `annex-b` feature for `boa_parser`.
- Renames `strict_mode` to `strict` to be consistent with `Parser::set_strict`.
@bors
Copy link

bors bot commented Apr 14, 2023

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Implement HTML comments and gate behind the annex-b feature [Merged by Bors] - Implement HTML comments and gate behind the annex-b feature Apr 14, 2023
@bors bors bot closed this Apr 14, 2023
@bors bors bot deleted the html-comments branch April 14, 2023 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants