MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _cpp_class_fields

Function _cpp_class_fields

graphify/extractors/engine.py:5660–5673  ·  view source on GitHub ↗
(node, source: bytes, positions: dict[str, int])

Source from the content-addressed store, hash-verified

5658
5659
5660def _cpp_class_fields(node, source: bytes, positions: dict[str, int]) -> dict[str, str]:
5661 fields: dict[str, str] = {}
5662 body = node.child_by_field_name("body")
5663 if body is not None:
5664 for field in body.named_children:
5665 if field.type != "field_declaration":
5666 continue
5667 for declarator in field.children_by_field_name("declarator"):
5668 name = _cpp_declarator_name(declarator, source)
5669 if name:
5670 value = _cpp_declared_receiver_type(field, declarator, source)
5671 fields[name] = value if fields.get(name, value) == value else ""
5672 positions[name] = declarator.start_byte
5673 return fields
5674
5675
5676def _cpp_local_binding_ranges(body, source: bytes) -> dict[str, list[tuple[int, int, str, str, str, bool]]]:

Callers 1

walkFunction · 0.85

Calls 3

_cpp_declarator_nameFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected