Parser
Parser copied to clipboard
Code generator maybe able to generate it. CPython cannot run this code anyway. [test_too_many_elif.py.zip](https://github.com/RustPython/Parser/files/11734300/test_too_many_elif.py.zip)
https://github.com/RustPython/RustPython/pull/3194/files#diff-f3c6d1f7423d91e0c39ccb0cb8e3cb98cc1fc27bf9bcb01d09fe76edee0a501aR495-R499
Instead of only running Rust tests, we should also add jobs for running RustPythons (and Ruffs if there's the desire?) tests with every PR. This will result in a larger...
## Feature In CPython, generator expression without parenthesis raises following error ```python3 >>> foo(x, z for z in range(10), t, w) File "", line 1 foo(x, z for z in...
https://github.com/mtshiba/pylyzer/pull/37#issuecomment-1580848898
d23611db65dca2a71eb58fdcdce9d637f8fef8c2 When parsing with this repo multiple files, I found that sometimes python cannot parse file but this library can and vice versa. Command to check if python can parse...
Currently, all of the parse functions return `Result`. This means that if the file has a syntax error, we get the error and nothing else. However, there are some use...
tracking issue for https://github.com/python/cpython/issues/81639
Inspired by https://docs.rs/pmutil/latest/pmutil/macro.smart_quote.html e.g. ```rust ExprKind::Tuple(ast::ExprTuple { elts: names .iter() .map(|&name| { create_expr(ExprKind::Constant( ast::ExprConstant { value: Constant::Str(name.to_string()), kind: None, }, )) }) .collect(), ctx: ExprContext::Load, })) ``` can be rewritten...
Add a new `Node` union that is an enum over all node types. This can be useful when implementing methods that can operate on any node. For example, Ruff's formatter...