The index of the first character from `i` that is neither whitespace nor in a comment.
(s: string, i: number)
| 182 | |
| 183 | /** The index of the first character from `i` that is neither whitespace nor in a comment. */ |
| 184 | function skipTrivia(s: string, i: number): number { |
| 185 | while (i < s.length) { |
| 186 | if (isSpace(s.charCodeAt(i))) i++; |
| 187 | else if (isCommentStart(s, i)) i = commentOrStringEnd(s, i); |
| 188 | else break; |
| 189 | } |
| 190 | return i; |
| 191 | } |
| 192 | |
| 193 | /** The index after the last character before `i` that is neither whitespace nor in a `{…}` or `(*…*)` comment. */ |
| 194 | function tokenEndBefore(s: string, i: number): number { |
no test coverage detected