[][src]Enum python_parser::ast::Expression

pub enum Expression {
    Ellipsis,
    None,
    True,
    False,
    Name(Name),
    Int(IntegerType),
    ImaginaryInt(IntegerType),
    Float(f64),
    ImaginaryFloat(f64),
    String(Vec<PyString>),
    Bytes(Vec<u8>),
    DictLiteral(Vec<DictItem>),
    SetLiteral(Vec<SetItem>),
    ListLiteral(Vec<SetItem>),
    TupleLiteral(Vec<SetItem>),
    DictComp(Box<DictItem>, Vec<ComprehensionChunk>),
    SetComp(Box<SetItem>, Vec<ComprehensionChunk>),
    ListComp(Box<SetItem>, Vec<ComprehensionChunk>),
    Generator(Box<SetItem>, Vec<ComprehensionChunk>),
    Await(Box<Expression>),
    Call(Box<Expression>, Vec<Argument>),
    Subscript(Box<Expression>, Vec<Subscript>),
    Attribute(Box<Expression>, Name),
    Uop(UopBox<Expression>),
    Bop(BopBox<Expression>, Box<Expression>),
    MultiBop(Box<Expression>, Vec<(Bop, Expression)>),
    Ternary(Box<Expression>, Box<Expression>, Box<Expression>),
    Yield(Vec<Expression>),
    YieldFrom(Box<Expression>),
    Star(Box<Expression>),
    Lambdef(UntypedArgsListBox<Expression>),
    Named(Box<Expression>, Box<Expression>),
}

The big thing: a Python expression.

Variants

Ellipsis
None
True
False
Name(Name)
ImaginaryInt(IntegerType)
Float(f64)
ImaginaryFloat(f64)
String(Vec<PyString>)
Bytes(Vec<u8>)
DictLiteral(Vec<DictItem>)
SetLiteral(Vec<SetItem>)
ListLiteral(Vec<SetItem>)
TupleLiteral(Vec<SetItem>)
Await(Box<Expression>)
Subscript(Box<Expression>, Vec<Subscript>)
Attribute(Box<Expression>, Name)

foo.bar

Unary operator

Binary operator. A simplified version of MultiBop, when the expressivity of MultiBop is not needed.

Binary operator... but may be applied on more than one expr (eg. a <= b < c)

1 if 2 else 3

Yield(Vec<Expression>)
YieldFrom(Box<Expression>)

Walrus operator: 1 := 2

Trait Implementations

impl Clone for Expression[src]

impl Debug for Expression[src]

impl PartialEq<Expression> for Expression[src]

impl StructuralPartialEq for Expression[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.