erg_parser

Crates.ioerg_parser
lib.rserg_parser
version0.6.48-nightly.1
sourcesrc
created_at2022-08-11 02:28:18.053223
updated_at2024-11-10 07:14:07.006168
descriptionThe Erg parser
homepagehttps://erg-lang.org/
repositoryhttps://github.com/erg-lang/erg
max_upload_size
id643047
size660,181
Shunsuke Shibayama (mtshiba)

documentation

http://docs.rs/erg_parser

README

Erg parser

Use erg_parser as a Python library

erg_parser can be built as a Python library by using pyo3/maturin.

Example

import erg_parser

module = erg_parser.parse("x = 1")
for chunk in module:
    if isinstance(chunk, erg_parser.expr.Def):
        assert chunk.sig.inspect() == "x"

Debug install (using venv)

python -m venv .venv
source .venv/bin/activate
maturin develop --features pylib_parser

Release install

maturin build -i python --release --features pylib_parser
pip install <output wheel>
Commit count: 4131

cargo fmt