Acorn with defaults for syntax parity with recent Node versions.
npm install acorn-node
var acorn = require('acorn-node')
The API is the same as acorn but with different defaults, to match Node modules:
ecmaVersion: 2022
allowHashBang: true
allowReturnOutsideFunction: true
var walk = require('acorn-node/walk')
The Acorn syntax tree walker. Comes preconfigured for the syntax plugins if necessary. See the acorn documentation for details.
The files in the repo root and the ./test folder are licensed as Apache-2.0.