MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / highlight_at

Function highlight_at

tests/integration/document_highlight.rs:6–17  ·  view source on GitHub ↗

Helper: open a file, trigger document highlight at a position, and return results.

(
    backend: &Backend,
    uri: &str,
    php: &str,
    line: u32,
    character: u32,
)

Source from the content-addressed store, hash-verified

4
5/// Helper: open a file, trigger document highlight at a position, and return results.
6fn highlight_at(
7 backend: &Backend,
8 uri: &str,
9 php: &str,
10 line: u32,
11 character: u32,
12) -> Vec<DocumentHighlight> {
13 backend.update_ast(uri, php);
14 backend
15 .handle_document_highlight(uri, php, Position { line, character })
16 .unwrap_or_default()
17}
18
19/// Shorthand to check that a highlight has the expected line, start col, end col, and kind.
20fn assert_highlight(

Calls 2

update_astMethod · 0.80