Skip to content

SymbolRef

Inspect a line's calls for individual source tokens linked to definitions. LineScope creates these links only when their destinations resolve conservatively.

dataclass linescope.model.SymbolRef[source]

Link one source token, rather than an entire line, to a definition.

Attributes

name : str

Original spelling of the linked source token.

line : int

One-based line containing the reference.

column : int

Inclusive zero-based character offset where the token starts.

end_column : int

Exclusive zero-based character offset where the token ends.

target : SourceLocation

Conservatively resolved destination in a captured snapshot.


See Also

LineStats

Aggregate a visible source line without inventing unsupported hit counts.

SourceLocation

Locate a one-based line and zero-based character column in a snapshot.

SymbolDefinition

Identify a statically resolved project definition.