Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. estree

estree

Elixir2.6.0

Elixir library providing ESTree JavaScript AST node structs and a JavaScript code generator.

GitHubGitHub
104 stars11 forks0 contributors

What is estree?

Elixir-ESTree is an Elixir library that implements the ESTree specification for JavaScript abstract syntax trees. It provides structured representations of JavaScript and JSX AST nodes as Elixir structs, along with a code generator to convert these ASTs back into JavaScript source code. This enables programmatic JavaScript code generation and manipulation directly from Elixir applications.

Target Audience

Elixir developers who need to generate, manipulate, or analyze JavaScript code programmatically, such as those building code transformation tools, compilers, or JavaScript-related development utilities.

Value Proposition

Developers choose Elixir-ESTree because it brings comprehensive JavaScript AST capabilities to the Elixir ecosystem with full ESTree specification compliance, JSX support, and an intuitive builder API that leverages Elixir's functional programming patterns for AST construction and manipulation.

Overview

The ESTree Nodes and JavaScript AST to JavaScript Code Generator in Elixir

Use Cases

Best For

  • Generating JavaScript code programmatically from Elixir applications
  • Building JavaScript code transformation or transpilation tools in Elixir
  • Creating custom JavaScript compilers or preprocessors with Elixir
  • Analyzing JavaScript ASTs using Elixir's pattern matching capabilities
  • Implementing JSX-to-JavaScript conversion pipelines in Elixir
  • Developing educational tools for JavaScript syntax and AST visualization

Not Ideal For

  • Projects requiring parsing of existing JavaScript code into ASTs
  • Real-time JavaScript execution or debugging environments
  • Teams heavily integrated with JavaScript-native toolchains like Babel or ESLint
  • Simple applications that only need to embed static JavaScript snippets

Pros & Cons

Pros

Full ESTree Compliance

Implements all JavaScript AST nodes as Elixir structs per the official ESTree spec, ensuring accurate and standards-compliant representations for code generation.

JSX AST Support

Includes structs for JSX elements following the Facebook JSX AST specification, enabling generation of JSX code directly from Elixir, as shown in the README examples.

Intuitive Builder API

Provides helper functions like Builder.array_expression for easy programmatic construction of AST nodes, leveraging Elixir's functional patterns for clean code.

Reliable Code Generation

The Generator module converts AST structs back into valid JavaScript source code strings, demonstrated with examples for both JavaScript and JSX output.

Cons

No Built-in Parser

The library focuses on AST representation and generation but lacks a JavaScript parser, requiring integration of external tools for parsing code into ASTs, which adds complexity.

Limited Ecosystem

As a niche Elixir library for JavaScript ASTs, it has fewer community contributions and integrations compared to popular JavaScript-native tools like Babel or Acorn.

Performance Overhead

For large-scale AST manipulations, the overhead of converting between Elixir structs and JavaScript code might impact performance relative to native JavaScript solutions.

Frequently Asked Questions

Quick Stats

Stars104
Forks11
Contributors0
Open Issues1
Last commit7 years ago
CreatedSince 2015

Tags

#elixir#compiler-tools#elixir-library#abstract-syntax-tree#code-generation#jsx

Built With

E
Elixir

Included in

Elixir13.1k
Auto-fetched 5 hours ago

Related Projects

elixirscriptelixirscript

Converts Elixir to JavaScript

Stars1,564
Forks68
Last commit7 years ago
phoenix_gonphoenix_gon

:fire: Phoenix variables in your JavaScript without headache.

Stars99
Forks20
Last commit2 years ago
phoenix_routes_jsphoenix_routes_js

Phoenix routes helpers in JavaScript code.

Stars21
Forks4
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub