Giron
v0.1.0
Table of Contents
Introduction
Giron is an ECMAScript parser written in Rust which outputs Rust strucs or JSON in the ESTree specification format.
The giron-wasm
provides the compiled .wasm binary and javascript interface for using the giron parser on the web.
Note: giron is a work in progress.
Contribution
This repository is looking for contributors. There's still a lot of work to be done, but some of the priorities right now are:
- Add more tests, ensure parity with output from esprima and/or acorn.
- Update parser and ESTree to be ECMAScript 2020 compliant.
- Add all early errors from the ECMAScript specification to the parser.
- Refactor the codebase to increase readability and add more documentation.
- Improve performance.
- Add JSX support.
Requirements
- You need to have Rust and Cargo installed. https://www.rust-lang.org/
- For giron-wasm you need a browser capable of executing WebAssembly.
Installation
- Clone the repository.
- Build the binary using cargo build.
Usage
To parse a javascript file using the built binary, run giron using cargo with a single argument providing the path of the file.
By default the result is output to stdout. To redirect it to a file: