Struct malk_lexer::TokensRef [] [src]

pub struct TokensRef<'t, 's: 't> {
    pub tokens: &'t [Token<'s>],
    pub end: TextPos,
}

Fields

Methods

impl<'t, 's: 't> TokensRef<'t, 's>
[src]

Slice a range of tokens between start_index (inclusive) and end_index (exclusive).

Slice a range of tokens between start_index and the end.

Split around the token at index returning all the tokens before it and all the tokens after it.

Trim whitespace tokens from both sides.

Get the span of this TokensRef

Trait Implementations

impl<'t, 's: 't> Debug for TokensRef<'t, 's>
[src]

Formats the value using the given formatter.

impl<'t, 's: 't> Clone for TokensRef<'t, 's>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'t, 's: 't> Copy for TokensRef<'t, 's>
[src]

impl<'t, 's: 't> PartialEq for TokensRef<'t, 's>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.