{"name":"acorn-loose","description":"Error-tolerant ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn-loose.js","module":"dist/acorn-loose.mjs","version":"7.0.0","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^7.0.0"},"maintainers":[{"name":"marijn","email":"marijnh@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:loose"},"license":"MIT","bugs":{"url":"https://github.com/acornjs/acorn/issues"},"_id":"acorn-loose@7.0.0","_nodeVersion":"10.11.0","_npmVersion":"6.10.2","_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"dist":{"integrity":"sha512-TIqpAWkqpdBXfj1XDVBQ/jNbAb6ByGfoqkcz2Pwd8mEHUndxOCw9FR6TqkMCMAr5XV8zYx0+m9GcGjxZzQuA2w==","shasum":"a4a6e8d2ae51dd5a8bdbc274b7ce3dd84964d13a","tarball":"http://registry-npm.ywwl.com/acorn-loose/download/acorn-loose-7.0.0.tgz","fileCount":8,"unpackedSize":302394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUm3kCRA9TVsSAnZWagAAuuIP/0yEzoKOCgF33c4p9zAI\nYn7yihUFfIzR0yG9ytMlDvSnZ5aPfLoEsb/wEPEjbWtVVCOW7tiB5XkZDAdr\ns5NYg8POlbt28PnsfYydHQWfHjxV2kwcYTfWWH479XqLOUTmgxwYJAy8/2ZM\nwP6PV6ELqKU2/0GnqHYb1lnR2Lu+pcz0+hD0dJC7Nxtd6KsQ64qCzx2MAy9z\nvCCiXqfYJJ5MKlzoRwLNj0kWX3x9qc6aIunpI/na4jw3VmF5kVmnSjfr8rTq\nXtn3PZ4AP6Stpd/HC6cWegD51QACwqdbXVD1aUfKODM0Bm8Au+Qq1oP2vSkJ\nX+LN7uySIKDFZTcmMD4sL6utEHe4Cxvb9igEyApvfEGgNLQawYF2cw5Dg/Ha\nuUC6WHosQZLIBjzeJ+uQfqb9qA9azKu/+WvDKkeFJBjn+3zSnoLJRhjLGmPR\nNKk4Rjl5L0UfSZVfQaTkdbCXlPx8SOfkldhMBgkmJKI43nyWlKhEr560cwqo\nfYcDtLSlxswqFn2SIcTP1kxxtJceUWO5V+AsRCkoyX8uqVxxiida7yOVdJQC\nM56Ckrr9FJKaDdMoaS+DB8FdurAgJkW+2zTuLU2HD2ZtesNkrS29v1wGc0YH\nDVMZJrgjMrKu4hWW2ukH+LZpsDame5Bt6EWSanQX1xB9xvRbm6BRbpV+zcWX\nkvJJ\r\n=K6ah\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXcOHW1PJUTUv4/+VKojNVrMn8v9C29ng2NnafWU1g/wIhAKs9UcjqFyDn2Nyd6q0+6b0LQahfpI+4DnY31w/USPhP"}],"size":57170,"noattachment":false,"key":"/acorn-loose/-/acorn-loose-7.0.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/acorn-loose_7.0.0_1565683171553_0.18402251613291543"},"_hasShrinkwrap":false,"readme":"# Acorn loose parser\n\nAn error-tolerant JavaScript parser written in JavaScript.\n\nThis parser will parse _any_ text into an\n[ESTree](https://github.com/estree/estree) syntax tree that is a\nreasonable approximation of what it might mean as a JavaScript\nprogram.\n\nIt will, to recover from missing brackets, treat whitespace as\nsignificant, which has the downside that it might mis-parse a valid\nbut weirdly indented file. It is recommended to always try a parse\nwith the regular `acorn` parser first, and only fall back to this\nparser when that one finds syntax errors.\n\n## Community\n\nAcorn is open source software released under an\n[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-loose/LICENSE).\n\nYou are welcome to [report\nbugs](https://github.com/acornjs/acorn/issues) or create pull requests\non [github](https://github.com/acornjs/acorn).\n\n## Installation\n\nThe easiest way to install acorn-loose is from [`npm`](https://www.npmjs.com/):\n\n```sh\nnpm install acorn-loose\n```\n\nAlternately, you can download the source and build acorn yourself:\n\n```sh\ngit clone https://github.com/acornjs/acorn.git\ncd acorn\nnpm install\n```\n\n## Interface\n\n**parse**`(input, options)` takes an input string and a set of options\n(the same options as\n[acorn](https://github.com/acornjs/acorn/blob/master/acorn/README.md)\ntakes), and returns a syntax tree, even if the code isn't\nsyntactically valid. It'll insert identifier nodes with name `\"✖\"` as\nplaceholders in places where it can't make sense of the input. Depends\non the `acorn` package, because it uses the same tokenizer.\n\n```javascript\nvar acornLoose = require(\"acorn-loose\");\nconsole.log(acornLoose.parse(\"1 / * 4 )[2]\", {ecmaVersion: 2020}));\n```\n\nLike the regular parser, the loose parser supports plugins. You can\ntake the **`LooseParser`** class exported by the module, and call its\nstatic `extend` method with one or more plugins to get a customized\nparser class. The class has a static `parse` method that acts like the\ntop-level `parse` method.\n\n**isDummy**`(node)` takes a `Node` and returns `true` if it is a dummy node\ninserted by the parser. The function performs a simple equality check on the\nnode's name.\n","publish_time":1565683171720,"_cnpm_publish_time":1565683171720,"dist-tags":{"latest":"8.5.2"}}