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

Method translate_php_to_blade

src/lib.rs:1206–1216  ·  view source on GitHub ↗

Translate a position from a virtual PHP file back to the original Blade file.

(
        &self,
        uri: &str,
        pos: tower_lsp::lsp_types::Position,
    )

Source from the content-addressed store, hash-verified

1204
1205 /// Translate a position from a virtual PHP file back to the original Blade file.
1206 pub(crate) fn translate_php_to_blade(
1207 &self,
1208 uri: &str,
1209 pos: tower_lsp::lsp_types::Position,
1210 ) -> tower_lsp::lsp_types::Position {
1211 if let Some(map) = self.blade_source_maps.read().get(uri) {
1212 map.php_to_blade(pos)
1213 } else {
1214 pos
1215 }
1216 }
1217
1218 /// Translate a location from virtual PHP coordinates back to original Blade
1219 /// coordinates if the location points into a Blade file.

Callers 9

translate_locationMethod · 0.80
handle_inlay_hintsMethod · 0.80
hoverMethod · 0.80
document_highlightMethod · 0.80
linked_editing_rangeMethod · 0.80
prepare_renameMethod · 0.80
renameMethod · 0.80

Calls 2

php_to_bladeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected