Skip to main content

ITokenMethods

Trait ITokenMethods 

Source
pub trait ITokenMethods: IToken {
    // Provided methods
    fn get_text(self) -> Il2CppString { ... }
    fn set_text(self, value: impl Into<Il2CppString>) { ... }
    fn ctor(
        self,
        type: impl Into<TokenType>,
        source_id: impl Into<i32>,
        from_line: impl Into<i32>,
        from_col: impl Into<i32>,
        to_line: impl Into<i32>,
        to_col: impl Into<i32>,
        prev_line: impl Into<i32>,
        prev_col: impl Into<i32>,
    ) { ... }
    fn to_string(self) -> Il2CppString { ... }
    fn get_number_value(self) -> f64 { ... }
    fn is_end_of_block(self) -> bool { ... }
    fn is_unary_operator(self) -> bool { ... }
    fn is_binary_operator(self) -> bool { ... }
    fn get_source_ref(self, is_step_stop: impl Into<bool>) -> SourceRef { ... }
    fn get_source_ref_2(
        self,
        to: impl Into<Token>,
        is_step_stop: impl Into<bool>,
    ) -> SourceRef { ... }
    fn get_source_ref_up_to(
        self,
        to: impl Into<Token>,
        is_step_stop: impl Into<bool>,
    ) -> SourceRef { ... }
}

Provided Methods§

Source

fn get_text(self) -> Il2CppString

get_Text() overload

Source

fn set_text(self, value: impl Into<Il2CppString>)

set_Text(::unity::Il2CppString) overload

Source

fn ctor( self, type: impl Into<TokenType>, source_id: impl Into<i32>, from_line: impl Into<i32>, from_col: impl Into<i32>, to_line: impl Into<i32>, to_col: impl Into<i32>, prev_line: impl Into<i32>, prev_col: impl Into<i32>, )

.ctor(crate::moon_sharp::interpreter::tree::tokentype::TokenType, i32, i32, i32, i32, i32, i32, i32) overload

Source

fn to_string(self) -> Il2CppString

ToString() overload

Source

fn get_number_value(self) -> f64

GetNumberValue() overload

Source

fn is_end_of_block(self) -> bool

IsEndOfBlock() overload

Source

fn is_unary_operator(self) -> bool

IsUnaryOperator() overload

Source

fn is_binary_operator(self) -> bool

IsBinaryOperator() overload

Source

fn get_source_ref(self, is_step_stop: impl Into<bool>) -> SourceRef

GetSourceRef(bool) overload

Source

fn get_source_ref_2( self, to: impl Into<Token>, is_step_stop: impl Into<bool>, ) -> SourceRef

GetSourceRef(crate::moon_sharp::interpreter::tree::token::Token, bool) overload

Source

fn get_source_ref_up_to( self, to: impl Into<Token>, is_step_stop: impl Into<bool>, ) -> SourceRef

GetSourceRefUpTo(crate::moon_sharp::interpreter::tree::token::Token, bool) overload

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<__T: IToken> ITokenMethods for __T

Available on crate feature moon_sharp-interpreter-tree-token only.