You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure to check if the next token is either an arrow or open brace. The open brace corresponds to a function expression where the user forgot the arrow.
Fixes issue #34.
Specifically:
* We no longer automatically assume "()" is a function expression. It must be followed by an arrow, colon, or curly brace.
* If an arrow is missing following a signature, but a curly brace is present, we assume the user forgot the arrow and try to parse the body anyway.
Fixes issue #34.
Specifically:
* We no longer automatically assume "()" is a function expression. It must be followed by an arrow, colon, or curly brace.
* If an arrow is missing following a signature, but a curly brace is present, we assume the user forgot the arrow and try to parse the body anyway.
When encountering code like
We make a strange assumption, which is that the
()
belongs to an arrow function like the following:This is weird because it bubbles up to nothing better than the error
In this case, we should check to see if the next token is an arrow (
=>
).The text was updated successfully, but these errors were encountered: