[][src]Enum rustpython_parser::token::Tok

pub enum Tok {
    Name {
        name: String,
    },
    Int {
        value: BigInt,
    },
    Float {
        value: f64,
    },
    Complex {
        real: f64,
        imag: f64,
    },
    String {
        value: String,
        is_fstring: bool,
    },
    Bytes {
        value: Vec<u8>,
    },
    Newline,
    Indent,
    Dedent,
    StartProgram,
    StartStatement,
    StartExpression,
    EndOfFile,
    Lpar,
    Rpar,
    Lsqb,
    Rsqb,
    Colon,
    Comma,
    Semi,
    Plus,
    Minus,
    Star,
    Slash,
    Vbar,
    Amper,
    Less,
    Greater,
    Equal,
    Dot,
    Percent,
    Lbrace,
    Rbrace,
    EqEqual,
    NotEqual,
    LessEqual,
    GreaterEqual,
    Tilde,
    CircumFlex,
    LeftShift,
    RightShift,
    DoubleStar,
    DoubleStarEqual,
    PlusEqual,
    MinusEqual,
    StarEqual,
    SlashEqual,
    PercentEqual,
    AmperEqual,
    VbarEqual,
    CircumflexEqual,
    LeftShiftEqual,
    RightShiftEqual,
    DoubleSlash,
    DoubleSlashEqual,
    At,
    AtEqual,
    Rarrow,
    Ellipsis,
    False,
    None,
    True,
    And,
    As,
    Assert,
    Async,
    Await,
    Break,
    Class,
    Continue,
    Def,
    Del,
    Elif,
    Else,
    Except,
    Finally,
    For,
    From,
    Global,
    If,
    Import,
    In,
    Is,
    Lambda,
    Nonlocal,
    Not,
    Or,
    Pass,
    Raise,
    Return,
    Try,
    While,
    With,
    Yield,
}

Python source code can be tokenized in a sequence of these tokens.

Variants

Name

Fields of Name

name: String
Int

Fields of Int

value: BigInt
Float

Fields of Float

value: f64
Complex

Fields of Complex

real: f64imag: f64
String

Fields of String

value: Stringis_fstring: bool
Bytes

Fields of Bytes

value: Vec<u8>
NewlineIndentDedentStartProgramStartStatementStartExpressionEndOfFileLparRparLsqbRsqbColonCommaSemiPlusMinusStarSlashVbarAmperLessGreaterEqualDotPercentLbraceRbraceEqEqualNotEqualLessEqualGreaterEqualTildeCircumFlexLeftShiftRightShiftDoubleStarDoubleStarEqualPlusEqualMinusEqualStarEqualSlashEqualPercentEqualAmperEqualVbarEqualCircumflexEqualLeftShiftEqualRightShiftEqualDoubleSlashDoubleSlashEqualAtAtEqualRarrowEllipsisFalseNoneTrueAndAsAssertAsyncAwaitBreakClassContinueDefDelElifElseExceptFinallyForFromGlobalIfImportInIsLambdaNonlocalNotOrPassRaiseReturnTryWhileWithYield

Trait Implementations

impl PartialEq<Tok> for Tok[src]

impl Clone for Tok[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Tok[src]

Auto Trait Implementations

impl Send for Tok

impl Unpin for Tok

impl Sync for Tok

impl UnwindSafe for Tok

impl RefUnwindSafe for Tok

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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