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] - Fix postfix operator line terminator parsing #2520

Closed
wants to merge 2 commits into from

Conversation

raskad
Copy link
Member

@raskad raskad commented Jan 7, 2023

Postfix increment / decrement operators require that there is no line terminator between the LHS expression and the operator. This was previously ignored.

@raskad raskad added bug Something isn't working parser Issues surrounding the parser labels Jan 7, 2023
@raskad raskad added this to the v0.17.0 milestone Jan 7, 2023
@github-actions
Copy link

github-actions bot commented Jan 7, 2023

Test262 conformance changes

Test result main count PR count difference
Total 94,188 94,188 0
Passed 70,164 70,204 +40
Ignored 18,605 18,605 0
Failed 5,419 5,379 -40
Panics 0 0 0
Conformance 74.49% 74.54% +0.04%
Fixed tests (40):
test/language/asi/S7.9_A5.6_T2.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.6_T2.js (previously Failed)
test/language/asi/S7.9_A5.4_T1.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.4_T1.js (previously Failed)
test/language/asi/S7.9_A5.2_T1.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.2_T1.js (previously Failed)
test/language/asi/S7.9_A5.7_T1.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.7_T1.js (previously Failed)
test/language/asi/S7.9_A5.3_T1.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.3_T1.js (previously Failed)
test/language/asi/S7.9_A5.1_T1.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.1_T1.js (previously Failed)
test/language/asi/S7.9_A5.6_T1.js [strict mode] (previously Failed)
test/language/asi/S7.9_A5.6_T1.js (previously Failed)
test/language/asi/S7.9.2_A1_T5.js [strict mode] (previously Failed)
test/language/asi/S7.9.2_A1_T5.js (previously Failed)
test/language/expressions/postfix-increment/line-terminator-line-feed.js [strict mode] (previously Failed)
test/language/expressions/postfix-increment/line-terminator-line-feed.js (previously Failed)
test/language/expressions/postfix-increment/line-terminator-carriage-return.js [strict mode] (previously Failed)
test/language/expressions/postfix-increment/line-terminator-carriage-return.js (previously Failed)
test/language/expressions/postfix-increment/line-terminator-paragraph-separator.js [strict mode] (previously Failed)
test/language/expressions/postfix-increment/line-terminator-paragraph-separator.js (previously Failed)
test/language/expressions/postfix-increment/line-terminator-line-separator.js [strict mode] (previously Failed)
test/language/expressions/postfix-increment/line-terminator-line-separator.js (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-line-feed.js [strict mode] (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-line-feed.js (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-carriage-return.js [strict mode] (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-carriage-return.js (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-paragraph-separator.js [strict mode] (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-paragraph-separator.js (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-line-separator.js [strict mode] (previously Failed)
test/language/expressions/postfix-decrement/line-terminator-line-separator.js (previously Failed)
test/language/eval-code/indirect/parse-failure-2.js [strict mode] (previously Failed)
test/language/eval-code/indirect/parse-failure-2.js (previously Failed)
test/language/eval-code/indirect/parse-failure-1.js [strict mode] (previously Failed)
test/language/eval-code/indirect/parse-failure-1.js (previously Failed)
test/language/eval-code/direct/parse-failure-2.js [strict mode] (previously Failed)
test/language/eval-code/direct/parse-failure-2.js (previously Failed)
test/language/eval-code/direct/parse-failure-1.js [strict mode] (previously Failed)
test/language/eval-code/direct/parse-failure-1.js (previously Failed)

@codecov
Copy link

codecov bot commented Jan 7, 2023

Codecov Report

Merging #2520 (3c42e6a) into main (3d5deba) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2520      +/-   ##
==========================================
+ Coverage   51.58%   51.61%   +0.03%     
==========================================
  Files         356      354       -2     
  Lines       35666    35612      -54     
==========================================
- Hits        18397    18382      -15     
+ Misses      17269    17230      -39     
Impacted Files Coverage Δ
boa_parser/src/parser/expression/update.rs 92.30% <100.00%> (+0.24%) ⬆️
boa_gc/src/pointers/weak.rs 44.44% <0.00%> (-44.45%) ⬇️
boa_gc/src/pointers/ephemeron.rs 47.36% <0.00%> (-34.22%) ⬇️
boa_gc/src/internals/ephemeron_box.rs 48.71% <0.00%> (-10.26%) ⬇️
boa_interner/src/lib.rs 80.67% <0.00%> (-3.37%) ⬇️
boa_gc/src/lib.rs 98.42% <0.00%> (-1.58%) ⬇️
boa_ast/src/punctuator.rs 44.14% <0.00%> (-0.91%) ⬇️
boa_ast/src/visitor.rs 10.58% <0.00%> (-0.59%) ⬇️
boa_gc/src/cell.rs 63.84% <0.00%> (-0.57%) ⬇️
boa_examples/src/bin/commuter_visitor.rs 0.00% <0.00%> (ø)
... and 5 more

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

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks good! Just a small comment to improve readability.

boa_parser/src/parser/expression/update.rs Outdated Show resolved Hide resolved
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Nice!

@jedel1043
Copy link
Member

We need to fix the random tarpaulin errors...

Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

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

Nice catch 😄

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jan 7, 2023
Postfix increment / decrement operators require that there is no line terminator between the LHS expression and  the operator. This was previously ignored.
@bors
Copy link

bors bot commented Jan 7, 2023

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Fix postfix operator line terminator parsing [Merged by Bors] - Fix postfix operator line terminator parsing Jan 7, 2023
@bors bors bot closed this Jan 7, 2023
@bors bors bot deleted the fix-asi branch January 7, 2023 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants