Loose parser fails to parse ArrayExpression on multiple lines
Author: mrennieCreated Jan 14, 2015Updated Sep 17, 2024
Using the latest from master parse the following:
var a = [1,
2,
3];The resulting AST has three root nodes in the body (I would expect only a variableDeclaration node) and has only one element in the elements array of the ArrayExpression node (I would expect three Literal nodes).
Acorn.parse(...) properly parses the same expression correctly.
Source: acornjs/acorn