Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_signature
codeintel.parsers.treesitter_parser._signature
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| clip | base.py | through an import |
| Symbol | File | Resolved by |
|---|---|---|
| parse_treesitter | treesitter_parser.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| treesitter_parser | treesitter_parser.py | same file |
codeintel.parsers.treesitter_parser._signaturebackend/app/codeintel/parsers/treesitter_parser.py, lines 381–389Open source
def _signature(node, src: bytes) -> str: """Definition header: text from the node start up to its body.""" body = node.child_by_field_name("body") end = body.start_byte if body is not None else node.end_byte header = src[node.start_byte:end].decode("utf-8", errors="replace") if body is None: header = header.split("\n", 1)[0] # A C macro's first line ends in a line continuation. return clip(header.rstrip().rstrip("\\").rstrip().rstrip("{").rstrip(), MAX_SIGNATURE_CHARS)What the index recorded
- Signature
def _signature(node, src: bytes) -> str:- File
backend/app/codeintel/parsers/treesitter_parser.py- Lines
- 381–389
- Parser
- python-ast
- Git blob
bf0c9a8044cadd3452ebf5ffa82b866ae00395a9- Call sites
- 5 named, 1 resolved, 4 left unlinked
