Skip to main content

find_only_token_in_range

Function find_only_token_in_range 

Source
pub fn find_only_token_in_range(
    range: TextRange,
    token_kind: SimpleTokenKind,
    code: &str,
) -> SimpleToken
Expand description

Returns the only non-trivia, non-closing parenthesis token in range.

Includes debug assertions that the range only contains that single token.