feat: make erg_compiler available as a Python lib

This commit is contained in:
Shunsuke Shibayama 2023-11-15 01:14:02 +09:00
parent 22ccf4d870
commit 8b17c6cf6c
9 changed files with 152 additions and 4 deletions

View file

@ -30,7 +30,7 @@ fn _parse(code: String) -> Result<ast::Module, error::ParseErrors> {
.map_err(|iart| iart.errors)
}
#[cfg(feature = "pylib")]
#[cfg(feature = "pylib_parser")]
#[pymodule]
fn erg_parser(py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(_parse, m)?)?;