MCPcopy
hub / github.com/webpack/webpack / consumePlusSign

Function consumePlusSign

lib/css/syntax.js:734–741  ·  view source on GitHub ↗

* `+` — number 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

732 * @returns {MutableToken | undefined} the resulting token, or undefined at EOF
733 */
734function consumePlusSign(input, pos, out) {
735 const start = pos - 1;
736 if (_ifThreeCodePointsWouldStartANumber(input, pos)) {
737 pos--;
738 return consumeANumericToken(input, pos, out);
739 }
740 return fill(out, TT_DELIM, start, pos);
741}
742
743/**
744 * Numeric token: number / percentage / dimension.

Callers 1

consumeATokenFunction · 0.85

Calls 3

consumeANumericTokenFunction · 0.85
fillFunction · 0.85

Tested by

no test coverage detected