(node, source: bytes)
| 5317 | |
| 5318 | |
| 5319 | def _cpp_plain_template_parameters(node, source: bytes) -> list[str]: |
| 5320 | if node is None or node.type != "template_declaration": |
| 5321 | return [] |
| 5322 | if len([c for c in node.named_children if c.type != "comment"]) != 2: |
| 5323 | return [] |
| 5324 | parameters = node.child_by_field_name("parameters") |
| 5325 | names = [] |
| 5326 | for parameter in parameters.named_children if parameters is not None else (): |
| 5327 | if (parameter.type != "type_parameter_declaration" |
| 5328 | or len(parameter.named_children) != 1 |
| 5329 | or parameter.named_children[0].type != "type_identifier"): |
| 5330 | return [] |
| 5331 | names.append(_read_text(parameter.named_children[0], source)) |
| 5332 | return names if len(set(names)) == len(names) else [] |
| 5333 | |
| 5334 | |
| 5335 | def _cpp_zero_arg_member_signature(node, source: bytes) -> tuple | None: |
no test coverage detected