package errpy

  1. Overview
  2. Docs
Errpy: An Error Recovering Rust Python Parser

Install

Dune Dependency

Authors

Maintainers

Sources

0.0.7.tar.gz
md5=0dcba0326c7bab93a3989ac9c17d1699
sha512=e8c8890db40dc5ae78bba04e43d4876eef97da8161f3ab54f372f7f8144b47f7dd60c42c94cff3c9d4fa1489d17f56da35f083b5eb3dacffb1aee77fa93e0946

Description

This is a new project to provide an error-recovering Python parser, implemented in Rust based on tree-sitter. Our short-term goal is to use it in the pyre type checker, in order to provide better IDE features.

Published: 17 Mar 2023

README

License: MIT"

Errpy: An Error Recovering Rust Python Parser

This is a new project to provide an error-recovering Python parser, implemented in Rust based on tree-sitter. Our short-term goal is to use it in the pyre type checker, in order to provide better IDE features.

License

Errpy is licensed under the MIT license.

Building

Errpy depends upon the following:

  • Ocaml
  • Dune
  • Rust
  • Cargo

Platform

ERRPY is verified as being buildable on Linux on OCaml 4.14.0

Installing Ocaml and Dune

Install opam and run opam switch install "4.14.0"

Usage

It is recommended to use dune as your build system. To use errpy in your dune project, you can add errpy to the libraries stanza in your dune file. For example,

(library
  (name mylib)
  (libraries errpy))

For local development

If you want to test your changes to errpy locally and use them in another OCaml project (.e.g. Pyre) you can try the following,

$ git clone <github repo location>
... make the required changed ...
$ cd errpy
$ dune build @install          # Build the errpy library
$ dune test                    # Run tests
$ opam pin add errpy . -n      # pin opam to errpy
$ opam install errpy --verbose # install local build as errpy in opam

Formatting

When making Ocaml changes you can run ocamlformat in order to ensure code is formmated in a conistent manner. This is invoked as follows:

$ dune build @fmt
$ dune promote

Dependencies (4)

  1. conf-rust-2021 build
  2. ppx_deriving
  3. dune >= "3.4"
  4. ocaml

Dev Dependencies (2)

  1. odoc with-doc
  2. ounit2 with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.