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