Skip to main content

Contextual Anchor

Definition

A Contextual Anchor is a @ghost annotation without #name. It has no identity of its own: GhostMap looks for the closest symbol within the ownership radius and attaches the description/status to it.

Example

// @ghost description: review error handling | status: review
function processPayment() {}
processPayment (review): review error handling

When to use it

Use a Contextual Anchor when the note is about the symbol immediately below and you do not need to reference it by name from elsewhere. If you want a note with its own identity (for example to group several symbols, or for a general file-level observation), use a Semantic Anchor.

Next step

Continue with Range Anchor to group whole code sections.