(source string, start, end int)
| 496 | } |
| 497 | |
| 498 | func skipBlockComment(source string, start, end int) int { |
| 499 | depth := 1 |
| 500 | for start+1 < end { |
| 501 | switch { |
| 502 | case source[start] == '/' && source[start+1] == '*': |
| 503 | depth++ |
| 504 | start += 2 |
| 505 | case source[start] == '*' && source[start+1] == '/': |
| 506 | depth-- |
| 507 | start += 2 |
| 508 | if depth == 0 { |
| 509 | return start |
| 510 | } |
| 511 | default: |
| 512 | start++ |
| 513 | } |
| 514 | } |
| 515 | return end |
| 516 | } |
| 517 | |
| 518 | func sourceFromLoc(source string, loc ast.Loc) string { |
| 519 | if loc.Start < 0 || loc.End < 0 || loc.Start >= len(source) { |
no outgoing calls
no test coverage detected