ruff/crates/ruff_python_parser/tests/snapshots/invalid_syntax@expressions__unary.py.snap
2024-11-15 19:31:15 +01:00

53 lines
1.3 KiB
Text

---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/invalid/expressions/unary.py
snapshot_kind: text
---
## AST
```
Module(
ModModule {
range: 0..10,
body: [
Expr(
StmtExpr {
range: 0..5,
value: UnaryOp(
ExprUnaryOp {
range: 0..5,
op: Not,
operand: Name(
ExprName {
range: 4..5,
id: Name("x"),
ctx: Load,
},
),
},
),
},
),
Expr(
StmtExpr {
range: 9..10,
value: NumberLiteral(
ExprNumberLiteral {
range: 9..10,
value: Int(
1,
),
},
),
},
),
],
},
)
```
## Errors
|
1 | not x := 1
| ^^ Syntax Error: Expected a statement
|