(node, source: bytes, positions: dict[str, int])
| 5658 | |
| 5659 | |
| 5660 | def _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 | |
| 5676 | def _cpp_local_binding_ranges(body, source: bytes) -> dict[str, list[tuple[int, int, str, str, str, bool]]]: |
no test coverage detected