Translate a position from a virtual PHP file back to the original Blade file.
(
&self,
uri: &str,
pos: tower_lsp::lsp_types::Position,
)
| 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. |
no test coverage detected