MCPcopy
hub / github.com/webpack/webpack / consumeLessThan

Function consumeLessThan

lib/css/syntax.js:896–905  ·  view source on GitHub ↗

* `<` — CDO or delim. * @param {string} input input * @param {number} pos position just past `<` * @param {MutableToken} out token to populate * @returns {MutableToken | undefined} the resulting token, or undefined at EOF

(input, pos, out)

Source from the content-addressed store, hash-verified

894 * @returns {MutableToken | undefined} the resulting token, or undefined at EOF
895 */
896function consumeLessThan(input, pos, out) {
897 if (
898 input.charCodeAt(pos) === CC_EXCLAMATION &&
899 input.charCodeAt(pos + 1) === CC_HYPHEN_MINUS &&
900 input.charCodeAt(pos + 2) === CC_HYPHEN_MINUS
901 ) {
902 return fill(out, TT_CDO, pos - 1, pos + 3);
903 }
904 return fill(out, TT_DELIM, pos - 1, pos);
905}
906
907/**
908 * `@` — at-keyword or delim.

Callers 1

consumeATokenFunction · 0.85

Calls 1

fillFunction · 0.85

Tested by

no test coverage detected