Skip to content

Make boa::parse emit error on invalid input, not panic - #807

Merged
Lan2u merged 7 commits into
boa-dev:masterfrom
gorogoroumaru:issue772
Oct 16, 2020
Merged

Lan2u merged 7 commits into
boa-dev:masterfrom
gorogoroumaru:issue772

Conversation

@gorogoroumaru

Copy link
Copy Markdown
Contributor

This Pull Request fixes/closes #772 .

It changes the following:

  • boa::parse panics on invalid input. This behavior is not expected, and I fixed this to emit error on invalid input
  • fixed typo in boa/src/syntax/ast/op.rs

@codecov

codecov Bot commented Oct 6, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #807 into master will increase coverage by 0.14%.
The diff coverage is 61.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #807      +/-   ##
==========================================
+ Coverage   59.15%   59.29%   +0.14%     
==========================================
  Files         155      165      +10     
  Lines        9841    10320     +479     
==========================================
+ Hits         5821     6119     +298     
- Misses       4020     4201     +181     
Impacted Files Coverage Δ
boa/src/builtins/console/mod.rs 22.47% <ø> (+3.37%) ⬆️
boa/src/builtins/string/string_iterator.rs 77.50% <0.00%> (ø)
boa/src/environment/global_environment_record.rs 27.95% <0.00%> (ø)
boa/src/lib.rs 86.36% <ø> (ø)
boa/src/object/iter.rs 21.21% <ø> (ø)
boa/src/profiler.rs 0.00% <0.00%> (ø)
boa/src/property/attribute/mod.rs 86.95% <ø> (-3.67%) ⬇️
boa/src/syntax/ast/node/await_expr/mod.rs 0.00% <0.00%> (ø)
boa/src/syntax/ast/op.rs 11.23% <ø> (ø)
boa/src/syntax/parser/expression/await_expr.rs 0.00% <0.00%> (ø)
... and 96 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 950ca18...e752f5e. Read the comment docs.

@HalidOdat HalidOdat added A-Bug Something isn't working lexer labels Oct 6, 2020
@HalidOdat HalidOdat added this to the v0.11.0 milestone Oct 6, 2020
Comment thread boa/src/syntax/lexer/number.rs Resolved
Comment thread boa/src/syntax/lexer/number.rs Resolved
Comment thread boa/src/syntax/lexer/number.rs Resolved
Comment thread boa/src/syntax/lexer/number.rs Resolved
@gorogoroumaru

Copy link
Copy Markdown
Contributor Author

Thank you @Lan2u and @HalidOdat!
I applied your suggested changes.

@Lan2u
Lan2u merged commit c711e40 into boa-dev:master Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic on invalid input to boa::parse, 'Could not convert to BigInt'

3 participants