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

Function detect_context

src/completion/phpdoc/context.rs:398–401  ·  view source on GitHub ↗

Determine what PHP symbol follows the docblock at the cursor position. This looks at the content after the docblock's closing `*/` (or after the current line if the docblock is still open) to identify the next meaningful PHP token.

(content: &str, position: Position)

Source from the content-addressed store, hash-verified

396/// the current line if the docblock is still open) to identify the next
397/// meaningful PHP token.
398pub fn detect_context(content: &str, position: Position) -> DocblockContext {
399 let remaining = get_text_after_docblock(content, position);
400 classify_from_tokens(&remaining)
401}
402
403/// Extract information about the PHP symbol following the docblock.
404///

Callers 1

complete_phpdoc_tagMethod · 0.85

Calls 2

get_text_after_docblockFunction · 0.85
classify_from_tokensFunction · 0.85

Tested by

no test coverage detected