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

parseInt, parseFloat implementation #459

Merged
merged 14 commits into from
Jun 9, 2020
Merged

parseInt, parseFloat implementation #459

merged 14 commits into from
Jun 9, 2020

Conversation

Lan2u
Copy link

@Lan2u Lan2u commented Jun 6, 2020

This Pull Request fixes/closes #447.

It changes the following:

  • Adds an implementation of the builtin parseInt and parseFloat functions
  • Associated tests

@codecov
Copy link

codecov bot commented Jun 6, 2020

Codecov Report

Merging #459 into master will increase coverage by 0.14%.
The diff coverage is 85.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #459      +/-   ##
==========================================
+ Coverage   66.24%   66.39%   +0.14%     
==========================================
  Files         131      146      +15     
  Lines        9039     9350     +311     
==========================================
+ Hits         5988     6208     +220     
- Misses       3051     3142      +91     
Impacted Files Coverage Δ
boa/src/builtins/function/mod.rs 72.22% <ø> (ø)
boa/src/builtins/number/mod.rs 67.54% <51.16%> (-3.81%) ⬇️
boa/src/builtins/number/tests.rs 100.00% <100.00%> (ø)
boa/src/exec/iteration/mod.rs 74.07% <0.00%> (-14.17%) ⬇️
boa/src/syntax/ast/node/mod.rs 17.94% <0.00%> (-6.42%) ⬇️
boa/src/syntax/parser/statement/mod.rs 53.33% <0.00%> (-5.93%) ⬇️
...tax/parser/expression/assignment/arrow_function.rs 89.18% <0.00%> (-2.48%) ⬇️
.../syntax/parser/expression/left_hand_side/member.rs 65.71% <0.00%> (-1.94%) ⬇️
boa/src/syntax/ast/node/iteration.rs 40.74% <0.00%> (-1.76%) ⬇️
boa/src/syntax/parser/expression/primary/mod.rs 75.00% <0.00%> (-1.32%) ⬇️
... and 33 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 d847ff8...3a7ade7. Read the comment docs.

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.

It's looking very good, thanks :) check my comments and see if it can be improved.

boa/src/builtins/number/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/number/mod.rs Outdated Show resolved Hide resolved
@Razican Razican added builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request labels Jun 6, 2020
@Razican Razican added this to the v0.9.0 milestone Jun 6, 2020
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.

Thanks for the changes :) I think there are a couple of issues with the implementation, check my comments.

boa/src/builtins/number/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/number/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/number/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/number/mod.rs Outdated Show resolved Hide resolved
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.

Perfect, this is good to go for me :)

boa/src/builtins/function/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: HalidOdat <halidodat@gmail.com>
@Razican Razican merged commit a78934d into boa-dev:master Jun 9, 2020
@Lan2u Lan2u deleted the parseInt_impl branch June 9, 2020 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parseInt, parseFloat missing
3 participants