Skip to main content

get_match

Function get_match 

Source
pub(crate) fn get_match<'db>(
    debug_active: bool,
    rule: &ResolvedRule<'db>,
    code: &SyntaxNode,
    restrict_range: &Option<FileRange>,
    sema: &Semantics<'db, RootDatabase>,
) -> Result<Match, MatchFailed>
Expand description

Checks if code matches the search pattern found in search_scope, returning information about the match, if it does. Since we only do matching in this module and searching is done by the parent module, we don’t populate nested matches.