removeInvalidAtIndex removes consecutive invalid identifiers from runes starting at index i.
(i int, runes []rune)
| 393 | |
| 394 | // removeInvalidAtIndex removes consecutive invalid identifiers from runes starting at index i. |
| 395 | func removeInvalidAtIndex(i int, runes []rune) []rune { |
| 396 | valid := i |
| 397 | for ; valid < len(runes) && !validIdentifier(runes[valid]); valid++ { |
| 398 | } |
| 399 | |
| 400 | return append(runes[:i], runes[valid:]...) |
| 401 | } |
| 402 | |
| 403 | var ( |
| 404 | // common words who need to keep their |
no test coverage detected