MCPcopy
hub / github.com/webpack/webpack / consume

Method consume

lib/css/syntax.js:1971–1978  ·  view source on GitHub ↗

* Consume a token (CSS Syntax §3 "consume a token") — return the next token * and advance the cursor past it. The returned token is valid until the next * `next` re-tokenizes (the reused instance is not cleared by advancing). * @returns {MutableToken} the consumed token

()

Source from the content-addressed store, hash-verified

1969 * @returns {MutableToken} the consumed token
1970 */
1971 consume() {
1972 const t = this.next();
1973 if (t.type !== TT_EOF) {
1974 this._pos = t.end;
1975 this._next = undefined;
1976 }
1977 return t;
1978 }
1979
1980 /**
1981 * Discard a token (CSS Syntax §3 "discard a token") — advance the cursor past

Callers 6

parseCssUrlsFunction · 0.95
consumeAnAtRuleFunction · 0.80
consumeATokenAsNodeFunction · 0.80
consumeADeclarationFunction · 0.80
consumeAComponentValueFunction · 0.80
consumeAFunctionFunction · 0.80

Calls 1

nextMethod · 0.95

Tested by

no test coverage detected