Helper: open a file, trigger document highlight at a position, and return results.
(
backend: &Backend,
uri: &str,
php: &str,
line: u32,
character: u32,
)
| 4 | |
| 5 | /// Helper: open a file, trigger document highlight at a position, and return results. |
| 6 | fn 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. |
| 20 | fn assert_highlight( |