{"library":"acorn-loose","type":"library","category":null,"description":"acorn-loose is an error-tolerant ECMAScript parser, currently at version 8.5.2, designed to produce an Abstract Syntax Tree (AST) conforming to the ESTree specification even when faced with syntactically invalid JavaScript code. It's part of the broader Acorn project, sharing the same tokenizer as the strict acorn parser, and updates are typically released in tandem with its parent project, following an active but unstated release cadence. Its primary differentiation from acorn is its robust recovery mechanism, which attempts to make sense of malformed input, sometimes by treating whitespace as significant or by inserting placeholder \"dummy\" nodes, identifiable by the name \"✖\", where it cannot resolve the syntax. This makes it invaluable for tasks like linting, code analysis, or language services where full parsing is required despite minor errors. However, it's generally recommended to first attempt parsing with the strict acorn parser and only fall back to acorn-loose if syntax errors are encountered, as its error-recovery can occasionally mis-parse valid but unusually indented code, leading to potentially unexpected AST structures.","language":"javascript","status":"active","version":"8.5.2","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install acorn-loose","imports":["import { parse } from 'acorn-loose'","import { LooseParser } from 'acorn-loose'","import { isDummy } from 'acorn-loose'"]},{"cmd":"yarn add acorn-loose","imports":[]},{"cmd":"pnpm add acorn-loose","imports":[]}],"homepage":null,"github":"https://github.com/acornjs/acorn","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/acorn-loose","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/acorn-loose/compatibility"}}