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

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

Merged
merged 7 commits into from Oct 16, 2020

Conversation

gorogoroumaru
Copy link
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
Copy link

codecov bot commented Oct 6, 2020

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 bug Something isn't working lexer Issues surrounding the lexer labels Oct 6, 2020
@HalidOdat HalidOdat added this to the v0.11.0 milestone Oct 6, 2020
boa/src/syntax/lexer/number.rs Outdated Show resolved Hide resolved
boa/src/syntax/lexer/number.rs Outdated Show resolved Hide resolved
gorogoroumaru and others added 2 commits October 11, 2020 11:16
Co-authored-by: Halid Odat <halidodat@gmail.com>
Co-authored-by: Halid Odat <halidodat@gmail.com>
@gorogoroumaru
Copy link
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
bug Something isn't working lexer Issues surrounding the lexer
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