Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

_c_declarator_name

codeintel.parsers.treesitter_parser._c_declarator_name

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 symbols

Loading

Calls (2)
SymbolFileResolved by
_last_segmenttreesitter_parser.pysame file
_texttreesitter_parser.pysame file
Inside (1)
SymbolFileResolved by
treesitter_parsertreesitter_parser.pysame file
codeintel.parsers.treesitter_parser._c_declarator_namebackend/app/codeintel/parsers/treesitter_parser.py, lines 123–133Open source
def _c_declarator_name(node, src):    """Walk a C/C++ declarator chain down to the function name."""    decl = node.child_by_field_name("declarator")    depth = 0    while decl is not None and depth < 16:        if decl.type in ("identifier", "field_identifier", "qualified_identifier",                         "destructor_name", "operator_name"):            return _last_segment(_text(decl, src))        decl = decl.child_by_field_name("declarator")        depth += 1    return None

What the index recorded

Signature
def _c_declarator_name(node, src):
File
backend/app/codeintel/parsers/treesitter_parser.py
Lines
123–133
Parser
python-ast
Git blob
bf0c9a8044cadd3452ebf5ffa82b866ae00395a9
Call sites
3 named, 2 resolved, 1 left unlinked

Read it on GitHub at this commit