Skip to content

Commit

Permalink
fix: minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Feb 8, 2025
1 parent acd5099 commit 001183d
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 73 deletions.
123 changes: 55 additions & 68 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ edition = "2021"
repository = "https://github.com/mtshiba/pylyzer"

[workspace.dependencies]
erg_common = { version = "0.6.52-nightly.1", features = ["py_compat", "els"] }
erg_compiler = { version = "0.6.52-nightly.1", features = ["py_compat", "els"] }
els = { version = "0.1.64-nightly.1", features = ["py_compat"] }
erg_common = { version = "0.6.52-nightly.2", features = ["py_compat", "els"] }
erg_compiler = { version = "0.6.52-nightly.2", features = ["py_compat", "els"] }
els = { version = "0.1.64-nightly.2", features = ["py_compat"] }
# rustpython-parser = { version = "0.3.0", features = ["all-nodes-with-ranges", "location"] }
# rustpython-ast = { version = "0.3.0", features = ["all-nodes-with-ranges", "location"] }
rustpython-parser = { git = "https://github.com/RustPython/Parser", version = "0.4.0", features = ["all-nodes-with-ranges", "location"] }
Expand Down
3 changes: 1 addition & 2 deletions crates/py2erg/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1825,10 +1825,9 @@ impl ASTConverter {
let rhs = self.convert_expr(*un.operand);
let (kind, cont) = match un.op {
UnOp::UAdd => (TokenKind::PrePlus, "+"),
// UnOp::Not => (TokenKind::PreBitNot, "not"),
UnOp::USub => (TokenKind::PreMinus, "-"),
UnOp::Invert => (TokenKind::PreBitNot, "~"),
_ => return Expr::Dummy(Dummy::new(None, vec![rhs])),
UnOp::Not => return Expr::Call(Identifier::public("not".into()).call1(rhs)),
};
let op = Token::from_str(kind, cont);
Expr::UnaryOp(UnaryOp::new(op, rhs))
Expand Down
Loading

0 comments on commit 001183d

Please sign in to comment.