acornjs/acorn

A small, fast, JavaScript-based JavaScript parser

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 24 minutes ago
Added to GitGenius on June 22nd, 2026
Created on September 24th, 2012
Open Issues & Pull Requests: 13 (+0)
GitHub issues: Enabled
Number of forks: 1,048
Total Stargazers: 11,451 (+0)
Total Subscribers: 195 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 1.4 hours
Mean response time: 14.6 days
90th percentile: 22.5 hours
Tracked items: 112

How this project is maintained

About 3% of issues opened in the past year have never received a reply. 95% of issues opened in the past year have since been closed. Three people close 97% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 6
New in 7 days: 2
Closed in 7 days: 4
Avg open age: 987 days
Stale 30+ days: 6
Stale 90+ days: 4

Recent activity

Opened in 7 days: 2
Closed in 7 days: 4
Comments in 7 days: 4
Events in 7 days: 8

Top labels

  • spam (17)
  • enhancement (1)

Detailed Description

Acorn is a lightweight JavaScript parser written entirely in JavaScript, designed to be both small and fast. The repository is classified across multiple domains including JavaScript parsing, syntax analysis, AST generation, ECMAScript support, tokenization, and compiler frontend functionality. It serves as a foundational tool for code parsing and source code analysis within the JavaScript ecosystem.

The Acorn repository is organized as a monorepo containing three distinct packages. The main acorn package provides the core parser functionality. The acorn-loose package offers an error-tolerant variant of the parser that can handle malformed or incomplete JavaScript code. The acorn-walk package provides utilities for traversing and analyzing syntax trees generated by the parser. All three packages are maintained within the same repository and can be built together using npm install.

A defining characteristic of Acorn is its plugin architecture, which allows developers to extend and customize parser behavior without forking the entire codebase. Plugins function as transformations applied to the Parser class, enabling the creation of parsers for JavaScript dialects and language extensions. The plugin system permits modification of tokenization behavior, addition of new token types, and extension of parser methods. While the plugin API requires understanding of Acorn's internal implementation and may break with significant internal changes, it enables powerful customization scenarios. Multiple plugins can theoretically be combined to support complex language features simultaneously, such as parsing code that contains both JSX syntax and type annotations.

The repository's influence extends across major JavaScript and systems projects. This cross-project involvement underscores Acorn's importance as a foundational parsing tool within the broader JavaScript and programming language ecosystem.

The project is released under an MIT license and actively welcomes community contributions through bug reports and pull requests on GitHub. The repository maintains an explicit commitment to open-source principles and community participation in its development process.