Enum python_ast::tree::expression::ExprType
source · pub enum ExprType {
BoolOp(BoolOp),
BinOp(BinOp),
UnaryOp(UnaryOp),
Compare(Compare),
Call(Call),
Constant(Constant),
Name(Name),
List(Vec<ExprType>),
NoneType(Constant),
Unimplemented(String),
}
Variants§
BoolOp(BoolOp)
BinOp(BinOp)
UnaryOp(UnaryOp)
Compare(Compare)
Call(Call)
Constant(Constant)
Name(Name)
List(Vec<ExprType>)
NoneType(Constant)
Unimplemented(String)
Trait Implementations§
source§impl<'a> CodeGen for ExprType
impl<'a> CodeGen for ExprType
§type Context = CodeGenContext
type Context = CodeGenContext
A type, generally an enum, that passes the code generator the context of the node.
§type Options = PythonOptions
type Options = PythonOptions
A struct representing the set of compilation options.
§type SymbolTable = SymbolTableScopes
type SymbolTable = SymbolTableScopes
A trait for a symbol table
source§fn to_rust(
self,
ctx: Self::Context,
options: Self::Options,
symbols: Self::SymbolTable
) -> Result<TokenStream, Box<dyn Error>>
fn to_rust( self, ctx: Self::Context, options: Self::Options, symbols: Self::SymbolTable ) -> Result<TokenStream, Box<dyn Error>>
A trait method to output Rust code in a general sense. The output should be stream of Rust tokens,
however, it is not guaranteed that it will fully compile because of scoping errors and other checks
that don’t occur until later.
source§fn find_symbols(self, symbols_in: Self::SymbolTable) -> Self::SymbolTable
fn find_symbols(self, symbols_in: Self::SymbolTable) -> Self::SymbolTable
A default implementation for find_symbols(), which simply returns the input.
Language nodes that modify the symbol table should override this method.
source§fn get_docstring(&self) -> Option<String>
fn get_docstring(&self) -> Option<String>
A trait method for extracting a docstring from an object that can have a docstring.
source§impl<'de> Deserialize<'de> for ExprType
impl<'de> Deserialize<'de> for ExprType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> FromPyObject<'a> for ExprType
impl<'a> FromPyObject<'a> for ExprType
source§impl PartialEq for ExprType
impl PartialEq for ExprType
impl StructuralPartialEq for ExprType
Auto Trait Implementations§
impl RefUnwindSafe for ExprType
impl Send for ExprType
impl Sync for ExprType
impl Unpin for ExprType
impl UnwindSafe for ExprType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more