Skip to main content
net10.0

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.

Published
Jul 22, 2026
2mo ago
Total Downloads
605
605

Install

dotnet add package Acorn.Loose --version 26.7.2846
ProductVersions
.NET
net10.0

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.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.