-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Create Number object #34
Comments
This sounds cool and I'm interested in contributing to Boa for Hacktoberfest. Mind if I start working on this? |
@pop assigned |
@jasonwilliams I've got most of the skeleton code up on my fork of boa (HERE). I'm not sure what you mean by how we should add the new Number object to the global scope. There already seems to be some kind of Number in boa, but not a proper Number object. Any hints? |
@pop sorry i thought i replied to this. |
Includes: - make_number() - call_number() - Number().toExponential() - Number().toFixed() - Number().toLocaleString() (ish) - Number().toString() - Number().valueOf() - create_constructor() - init() Missing: - Number().toPrecision() refs boa-dev#34
Includes: - make_number() - call_number() - Number().toExponential() - Number().toFixed() - Number().toLocaleString() (ish) - Number().toString() - Number().valueOf() - create_constructor() - init() Missing: - Number().toPrecision() refs boa-dev#34
Includes: - make_number() - call_number() - Number().toExponential() - Number().toFixed() - Number().toLocaleString() (ish) - Number().toString() - Number().valueOf() - create_constructor() - init() Missing: - Number().toPrecision() refs boa-dev#34
Includes: - make_number() - call_number() - Number().toExponential() - Number().toFixed() - Number().toLocaleString() (ish) - Number().toString() - Number().valueOf() - create_constructor() - init() Missing: - Number().toPrecision() refs boa-dev#34
I don't have all the context on _why_ but all of the tests for `Number` started failing. Upon investigation it was becuase `const` stopped acting the way I expected. Switching my test cases from using `const` to using `var` variable declarations made everything work again. I don't know enough about JS to know if this is a bug or expected behavior. Based on changes to other tests, it is know behavior. Refs boa-dev#34
Includes some clippy fixes. Fixes boa-dev#34
Includes some clippy fixes. Fixes boa-dev#34
Includes: - make_number() - call_number() - Number().toExponential() - Number().toFixed() - Number().toLocaleString() (ish) - Number().toString() - Number().valueOf() - create_constructor() - init() Missing: - Number().toPrecision() refs boa-dev#34
I don't have all the context on _why_ but all of the tests for `Number` started failing. Upon investigation it was becuase `const` stopped acting the way I expected. Switching my test cases from using `const` to using `var` variable declarations made everything work again. I don't know enough about JS to know if this is a bug or expected behavior. Based on changes to other tests, it is know behavior. Refs boa-dev#34
Includes some clippy fixes. Fixes boa-dev#34
You can look at how String is created, here:
https://github.com/jasonwilliams/boa/blob/master/src/lib/js/string.rs
boolean
https://github.com/jasonwilliams/boa/blob/master/src/lib/js/boolean.rs
Its then added to the global scope here:
https://github.com/jasonwilliams/boa/blob/master/src/lib/exec.rs#L36
The text was updated successfully, but these errors were encountered: