Skip to main content
net10.0

A C# port of acorn-walk, an AST walker for ESTree-compatible syntax trees produced by Acorn. Ported from the JavaScript implementation at https://github.com/acornjs/acorn.

Published
Sep 7, 2026
1mo ago
Total Downloads
620
620

Install

dotnet add package Acorn.Walk --version 26.9.4806
ProductVersions
.NET
net10.0

README

Acorn.Walk

A C# port of acorn-walk, the syntax-tree walker for ESTree trees produced by the Acorn parser. Targets .NET 10.

using Acorn;
using Acorn.Walk;

Node ast = Parser.ParseStatic("f(1); g(2);", new Options { EcmaVersion = 2020 });

AstWalker.Simple(ast, new Dictionary<string, Action<Node, object?>>
{
    ["CallExpression"] = (node, state) =>
        Console.WriteLine("call at " + node.Start)
});

Provides AstWalker.Simple, Ancestor, Recursive, Full, FullAncestor, FindNodeAt, FindNodeAround, FindNodeAfter, FindNodeBefore, Make, and the BaseVisitor table.

MIT licensed, like upstream Acorn.

Changes from Previous Version

No structural changes between v26.9.4786 and v26.9.4806.

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.