getLexer.cjs 471 B

123456789101112131415161718192021
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. /**
  5. * @typedef {import('css-tree').Lexer} Lexer
  6. */
  7. /**
  8. * @param {import('stylelint').RuleContext} context
  9. * @returns {Lexer}
  10. */
  11. function getLexer(context) {
  12. if (!context?.lexer) {
  13. throw new Error('Expected a "lexer" object');
  14. }
  15. return /** @type Lexer */ (context.lexer);
  16. }
  17. module.exports = getLexer;