Enum python_parser::ast::Expression [−][src]
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>),
Call(Box<Expression>, Vec<Argument>),
Subscript(Box<Expression>, Vec<Subscript>),
Attribute(Box<Expression>, Name),
Uop(Uop, Box<Expression>),
Bop(Bop, Box<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(UntypedArgsList, Box<Expression>),
}The big thing: a Python expression.
Variants
EllipsisNoneTrueFalseName(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>)Call(Box<Expression>, Vec<Argument>)Subscript(Box<Expression>, Vec<Subscript>)Attribute(Box<Expression>, Name)foo.bar
Uop(Uop, Box<Expression>)Unary operator
Bop(Bop, Box<Expression>, Box<Expression>)Binary operator. A simplified version of MultiBop, when the
expressivity of MultiBop is not needed.
MultiBop(Box<Expression>, Vec<(Bop, Expression)>)Binary operator... but may be applied on more than one expr
(eg. a <= b < c)
Ternary(Box<Expression>, Box<Expression>, Box<Expression>)1 if 2 else 3
Yield(Vec<Expression>)YieldFrom(Box<Expression>)Star(Box<Expression>)Lambdef(UntypedArgsList, Box<Expression>)
Trait Implementations
impl Clone for Expression[src]
impl Clone for Expressionfn clone(&self) -> Expression[src]
fn clone(&self) -> ExpressionReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for Expression[src]
impl Debug for Expressionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Expression[src]
impl PartialEq for Expressionfn eq(&self, other: &Expression) -> bool[src]
fn eq(&self, other: &Expression) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Expression) -> bool[src]
fn ne(&self, other: &Expression) -> boolThis method tests for !=.
Auto Trait Implementations
impl Send for Expression
impl Send for Expressionimpl Sync for Expression
impl Sync for Expression