mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-28 06:14:56 +00:00
Fine-tune int types
This commit is contained in:
parent
455bcc01a0
commit
6fa3d0f90a
15 changed files with 27 additions and 42 deletions
|
@ -154,7 +154,7 @@ pub struct StmtAnnAssign<U = ()> {
|
|||
pub target: Box<Expr<U>>,
|
||||
pub annotation: Box<Expr<U>>,
|
||||
pub value: Option<Box<Expr<U>>>,
|
||||
pub simple: Int,
|
||||
pub simple: bool,
|
||||
}
|
||||
|
||||
impl<U> From<StmtAnnAssign<U>> for StmtKind<U> {
|
||||
|
@ -815,7 +815,7 @@ pub struct Comprehension<U = ()> {
|
|||
pub target: Expr<U>,
|
||||
pub iter: Expr<U>,
|
||||
pub ifs: Vec<Expr<U>>,
|
||||
pub is_async: Int,
|
||||
pub is_async: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
|
|
@ -429,7 +429,7 @@ impl<'a> Unparser<'a> {
|
|||
|
||||
fn unparse_comp<U>(&mut self, generators: &[Comprehension<U>]) -> fmt::Result {
|
||||
for comp in generators {
|
||||
self.p(if comp.is_async.to_bool() {
|
||||
self.p(if comp.is_async {
|
||||
" async for "
|
||||
} else {
|
||||
" for "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue