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

Function linked_editing_at

tests/integration/linked_editing.rs:6–15  ·  view source on GitHub ↗

Helper: open a file, trigger linked editing range 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 linked editing range at a position, and return results.
6fn linked_editing_at(
7 backend: &Backend,
8 uri: &str,
9 php: &str,
10 line: u32,
11 character: u32,
12) -> Option<LinkedEditingRanges> {
13 backend.update_ast(uri, php);
14 backend.handle_linked_editing_range(uri, php, Position { line, character })
15}
16
17/// Shorthand to check that a range has the expected line, start col, and end col.
18fn assert_range(r: &Range, line: u32, start_char: u32, end_char: u32) {

Calls 2

update_astMethod · 0.80