(lexer, start)
| 1160 | return createToken(lexer, _tokenKind.TokenKind.EOF, bodyLength, bodyLength); |
| 1161 | } |
| 1162 | function readComment(lexer, start) { |
| 1163 | const body = lexer.source.body; |
| 1164 | const bodyLength = body.length; |
| 1165 | let position = start + 1; |
| 1166 | while (position < bodyLength) { |
| 1167 | const code = body.charCodeAt(position); |
| 1168 | if (code === 10 || code === 13) { |
| 1169 | break; |
| 1170 | } |
| 1171 | if (isUnicodeScalarValue(code)) { |
| 1172 | ++position; |
| 1173 | } else if (isSupplementaryCodePoint(body, position)) { |
| 1174 | position += 2; |
| 1175 | } else { |
| 1176 | break; |
| 1177 | } |
| 1178 | } |
| 1179 | return createToken( |
| 1180 | lexer, |
| 1181 | _tokenKind.TokenKind.COMMENT, |
| 1182 | start, |
| 1183 | position, |
| 1184 | body.slice(start + 1, position) |
| 1185 | ); |
| 1186 | } |
| 1187 | function readNumber(lexer, start, firstCode) { |
| 1188 | const body = lexer.source.body; |
| 1189 | let position = start; |
no test coverage detected