The end of the argument list opened at `open` ('('), balanced; parentheses * in `//` comments and literals do not count. */
| 401 | /* The end of the argument list opened at `open` ('('), balanced; parentheses |
| 402 | * in `//` comments and literals do not count. */ |
| 403 | static const char *op_args_end(const char *open) { |
| 404 | int depth = 0; |
| 405 | char quote = 0; |
| 406 | for (const char *p = open; *p; p++) { |
| 407 | if (quote) { |
| 408 | if (*p == '\\' && quote != '`' && p[SKIP_ONE]) { |
| 409 | p++; |
| 410 | } else if (*p == quote || (*p == '\n' && quote != '`')) { |
| 411 | quote = 0; |
| 412 | } |
| 413 | continue; |
| 414 | } |
| 415 | if (op_is_quote(*p)) { |
| 416 | quote = *p; |
| 417 | continue; |
| 418 | } |
| 419 | if (*p == '/' && p[SKIP_ONE] == '/') { |
| 420 | p = strchr(p, '\n'); |
| 421 | if (!p) { |
| 422 | break; |
| 423 | } |
| 424 | continue; |
| 425 | } |
| 426 | depth += *p == '('; |
| 427 | depth -= *p == ')'; |
| 428 | if (depth == 0) { |
| 429 | return p; |
| 430 | } |
| 431 | } |
| 432 | return open + strlen(open); |
| 433 | } |
| 434 | |
| 435 | static bool op_ident_char(char c) { |
| 436 | return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'; |
no test coverage detected