-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
The following code:
function foo() {
return
bar()
}is properly parsed to the following output:
Right (JSAstProgram [JSFunction 'foo' () (JSBlock [JSReturn ,JSMethodCall (JSIdentifier 'bar',JSArguments ())])])However, this semantically identical piece of code:
function foo() {
return //
bar()
}Seems to get parsed to the following:
Right (JSAstProgram [JSFunction 'foo' () (JSBlock [JSReturn JSMemberExpression (JSIdentifier 'bar',JSArguments ()) ])])Here, the parser is interpreting the code as the function returning the result of bar(), instead of them being separate sentences.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels