emmylua_parser

Trait LuaAstToken

source
pub trait LuaAstToken {
    // Required methods
    fn syntax(&self) -> &LuaSyntaxToken;
    fn can_cast(kind: LuaTokenKind) -> bool
       where Self: Sized;
    fn cast(syntax: LuaSyntaxToken) -> Option<Self>
       where Self: Sized;

    // Provided method
    fn get_token_kind(&self) -> LuaTokenKind { ... }
}

Required Methods§

source

fn syntax(&self) -> &LuaSyntaxToken

source

fn can_cast(kind: LuaTokenKind) -> bool
where Self: Sized,

source

fn cast(syntax: LuaSyntaxToken) -> Option<Self>
where Self: Sized,

Provided Methods§

Implementors§