* @brief Get parameters of a function with defaults * @param string $currentFunction Current function name * @param array $parameters Parameter names * @return string Parameter list */
(string $currentFunction, array $parameters)
| 153 | * @return string Parameter list |
| 154 | */ |
| 155 | function getFullParameters(string $currentFunction, array $parameters): string |
| 156 | { |
| 157 | global $header; |
| 158 | foreach ($header as $line) { |
| 159 | if (preg_match('/^\s*void\s+' . $currentFunction . '\s*\((.*' . join('.*', $parameters) . '.*)command_completion_event_t\s*callback\s*/', $line, $matches)) { |
| 160 | return preg_replace('/,\s*$/', '', $matches[1]); |
| 161 | } |
| 162 | } |
| 163 | return ''; |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * @brief Get the comment block of a function. |