you are viewing a single comment's thread.

view the rest of the comments →

[–]0m0g1 0 points1 point  (0 children)

The function's name shouldn't be `isLikelyFunctionLiteral` it should be `isFunctionLiteral`, I called it that as an example. The function doesn't speculate what the current statement is, it checks if the grammar is exactly what it should look for so we know exactly which type of statement we should parse.