skipLineComment returns the index of the newline ending the -- or # comment opened at i, or len(s)-1 if it runs to the end.
(s string, i int)
| 854 | // skipLineComment returns the index of the newline ending the -- or # comment |
| 855 | // opened at i, or len(s)-1 if it runs to the end. |
| 856 | func skipLineComment(s string, i int) int { |
| 857 | for j := i; j < len(s); j++ { |
| 858 | if s[j] == '\n' { |
| 859 | return j |
| 860 | } |
| 861 | } |
| 862 | return len(s) - 1 |
| 863 | } |
| 864 | |
| 865 | func isASCIISpace(c byte) bool { |
| 866 | return c == ' ' || c == '\t' || c == '\n' || c == '\r' |