Get the text after the current docblock's closing `*/`. If the docblock isn't closed yet, returns the text after the cursor position (skipping lines that look like docblock continuation).
(content: &str, position: Position)
| 416 | /// If the docblock isn't closed yet, returns the text after the cursor |
| 417 | /// position (skipping lines that look like docblock continuation). |
| 418 | fn get_text_after_docblock(content: &str, position: Position) -> String { |
| 419 | let byte_offset = position_to_byte_offset(content, position); |
| 420 | let after_cursor = &content[byte_offset.min(content.len())..]; |
| 421 | |
| 422 | if let Some(close_pos) = after_cursor.find("*/") { |
| 423 | after_cursor[close_pos + 2..].to_string() |
| 424 | } else { |
| 425 | // Docblock not closed — return whatever follows |
| 426 | after_cursor.to_string() |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | /// Classify the PHP symbol from the first meaningful tokens. |
| 431 | fn classify_from_tokens(text: &str) -> DocblockContext { |
no test coverage detected