Extract parameter list as a string.
(self, node, language: str, source: bytes)
| 6029 | return None |
| 6030 | |
| 6031 | def _get_params(self, node, language: str, source: bytes) -> Optional[str]: |
| 6032 | """Extract parameter list as a string.""" |
| 6033 | for child in node.children: |
| 6034 | param_types = ( |
| 6035 | "parameters", "formal_parameters", |
| 6036 | "parameter_list", "formal_parameter_list", |
| 6037 | ) |
| 6038 | if child.type in param_types: |
| 6039 | return child.text.decode("utf-8", errors="replace") |
| 6040 | # Solidity: parameters are direct children between ( and ) |
| 6041 | if language == "solidity": |
| 6042 | params = [ |
| 6043 | c.text.decode("utf-8", errors="replace") |
| 6044 | for c in node.children |
| 6045 | if c.type == "parameter" |
| 6046 | ] |
| 6047 | if params: |
| 6048 | return f"({', '.join(params)})" |
| 6049 | return None |
| 6050 | |
| 6051 | def _get_return_type(self, node, language: str, source: bytes) -> Optional[str]: |
| 6052 | """Extract return type annotation if present.""" |
no outgoing calls
no test coverage detected