mirror of https://github.com/astral-sh/ruff
Update CONTRIBUTING.md to reflect the new parser (#11434)
## Summary CONTRIBUTING.md says that `cargo dev print-ast` uses the old RuffPython parser, even though, as far as I can tell, it uses the shiny new parser. This PR fixes this. ## Test Plan CI jobs should do the trick -- I didn't modify any code.
This commit is contained in:
parent
6963f75a14
commit
7ac9cabbff
|
|
@ -637,11 +637,11 @@ Otherwise, follow the instructions from the linux section.
|
||||||
`cargo dev` is a shortcut for `cargo run --package ruff_dev --bin ruff_dev`. You can run some useful
|
`cargo dev` is a shortcut for `cargo run --package ruff_dev --bin ruff_dev`. You can run some useful
|
||||||
utils with it:
|
utils with it:
|
||||||
|
|
||||||
- `cargo dev print-ast <file>`: Print the AST of a python file using the
|
- `cargo dev print-ast <file>`: Print the AST of a python file using Ruff's
|
||||||
[RustPython parser](https://github.com/astral-sh/ruff/tree/main/crates/ruff_python_parser) that is
|
[Python parser](https://github.com/astral-sh/ruff/tree/main/crates/ruff_python_parser).
|
||||||
mainly used in Ruff. For `if True: pass # comment`, you can see the syntax tree, the byte offsets
|
For `if True: pass # comment`, you can see the syntax tree, the byte offsets for start and
|
||||||
for start and stop of each node and also how the `:` token, the comment and whitespace are not
|
stop of each node and also how the `:` token, the comment and whitespace are not represented
|
||||||
represented anymore:
|
anymore:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue