A C# port of acorn-loose, the error-tolerant JavaScript parser companion to Acorn. Ported from the JavaScript implementation at https://github.com/acornjs/acorn.
Install
| Product | Versions |
|---|---|
| .NET |
README
Acorn.Loose
A C# port of acorn-loose, the error-tolerant variant of the Acorn JavaScript parser. It tries to parse anything as JavaScript, repairing syntax errors as best it can, producing a mostly-valid ESTree tree instead of throwing. Targets .NET 10.
using Acorn;
using Acorn.Loose;
// Incomplete / broken input still yields a best-effort tree.
Node ast = AcornLoose.Parse("foo(bar,", new Options { EcmaVersion = 2020 });
The recommended pattern is to try Acorn.Parser.ParseStatic first, and fall
back to AcornLoose.Parse only when it throws.
MIT licensed, like upstream Acorn.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.