The code character before `at`, past blanks and `//` comments: gofmt * puts a chain's '.' at the end of an earlier line, and comment lines may * sit between. NULL at the start of the text. */
| 380 | * puts a chain's '.' at the end of an earlier line, and comment lines may |
| 381 | * sit between. NULL at the start of the text. */ |
| 382 | static const char *op_prev_code(const char *text, const char *at) { |
| 383 | const char *le = at; |
| 384 | for (;;) { |
| 385 | const char *ls = op_line_start(text, le); |
| 386 | const char *end = op_comment_start(ls, le); |
| 387 | while (end > ls && |
| 388 | (end[-SKIP_ONE] == ' ' || end[-SKIP_ONE] == '\t' || end[-SKIP_ONE] == '\r')) { |
| 389 | end--; |
| 390 | } |
| 391 | if (end > ls) { |
| 392 | return end - SKIP_ONE; |
| 393 | } |
| 394 | if (ls == text) { |
| 395 | return NULL; |
| 396 | } |
| 397 | le = ls - SKIP_ONE; /* the previous line, without its '\n' */ |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | /* The end of the argument list opened at `open` ('('), balanced; parentheses |
| 402 | * in `//` comments and literals do not count. */ |
no test coverage detected