MCPcopy Create free account
hub / github.com/openai/plugins / readComment

Function readComment

plugins/shopify/skills/shopify-admin/scripts/validate.mjs:1162–1186  ·  view source on GitHub ↗
(lexer, start)

Source from the content-addressed store, hash-verified

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;

Callers 1

readNextTokenFunction · 0.70

Calls 3

isUnicodeScalarValueFunction · 0.70
isSupplementaryCodePointFunction · 0.70
createTokenFunction · 0.70

Tested by

no test coverage detected