-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
TypeOf failing #359
Comments
I'm willing to take this on. |
Go ahead! Let us know if you need help! |
How do we decide this? Looking at the spec, it does seem indeed to be a unary operator, right? |
You’re right now I see it’s a unary expression |
In this case, I think it's best to implement it as a unary expression and remove the |
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
Removed Node::TypeOf, implemented UnaryOp::TypeOf, and added tests
TypeOf is defined as both a Node:
https://github.com/jasonwilliams/boa/blob/master/boa/src/syntax/ast/node.rs#L421
And a UnaryOp Variant:
https://github.com/jasonwilliams/boa/blob/master/boa/src/syntax/parser/expression/unary.rs#L58-L60
looking at the spec it seems the former is what we should keep and we should remove it from being a unary variant.
Right now the variant is being used but there's no implementation on the exec side
Make some JS, like this to test.
I'm not sure we will need https://github.com/jasonwilliams/boa/blob/master/boa/src/builtins/value/mod.rs#L631-L651 once Node::TypeOf is being used.
Spec:
https://tc39.es/ecma262/#sec-typeof-operator
Debugging
https://github.com/jasonwilliams/boa/blob/master/docs/debugging.md
The text was updated successfully, but these errors were encountered: