Parser icon indicating copy to clipboard operation
Parser copied to clipboard

Results 36 Parser issues
Sort by recently updated
recently updated
newest added

Works with 1.75.0, but here is the issue with 1.76.0 ``` --> /home/rfiszel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustpython-ast-0.3.0/src/impls.rs:60:1 | 60 | static_assertions::assert_eq_size!(crate::Stmt, [u8; 160]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: `generic::Stmt` (1216 bits) =...

```let tokens = lex("print(", Mode::Expression);``` tokens is an infinite iterator when the source contains an error. Is it intended behaviour for the iterator to be infinite?

I'm trying to extract all the imports from a python file. To do this I'm using the `rustpython_parser::parse` function to get an AST and then iterating over all the statements...

Originally reported as https://github.com/astral-sh/ruff/issues/5044: > Not the best string ever, but ruff doesn't handle it like Python > > ``` > λ cat test.py > print(f"$N_{{img}}\in\{{0,1,2\}}$") > λ python test.py...

bug

Currently it does not seem to be possible to get an AST with comments attached?

In https://github.com/RustPython/Parser/pull/93, we add `type_params: Vec` to `ClassDef` and `FunctionDef` which increases the size of a statement. We may want to optimize this field to reduce the size of the...

We have three parser descriptions for in the LALRPOP grammar for generating `Expr::Name` from an `Identifier`. - `TypeAliasName` - `MatchName` - `Atom` These could be consolidated into a single reused...

Ref https://github.com/RustPython/RustPython/pull/3942

bug

Originally reported as https://github.com/astral-sh/ruff/issues/4992. > I'm not quite sure where the incorrectness here is, but I think this bug indicates an incorrect parsing of the `yield from` expression. The following...

bug