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

Function do_while_body

src/selection_range.rs:1244–1261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1242
1243 #[test]
1244 fn do_while_body() {
1245 let content = r#"<?php
1246do {
1247 echo "loop";
1248} while (true);
1249"#;
1250 // Cursor on "loop" (line 2, char 10).
1251 let results = selection_ranges(content, &[Position::new(2, 10)]);
1252 assert_eq!(results.len(), 1);
1253 let ranges = flatten(&results[0]);
1254 // string → echo → block → do-while → file
1255 assert!(
1256 ranges.len() >= 3,
1257 "Expected at least 3 levels for do-while body, got {}",
1258 ranges.len()
1259 );
1260 assert_nested(&ranges);
1261 }
1262
1263 // ─── 6. Try/catch/finally ───────────────────────────────────────────
1264

Callers

nothing calls this directly

Calls 3

selection_rangesFunction · 0.85
flattenFunction · 0.85
assert_nestedFunction · 0.85

Tested by

no test coverage detected