NestingSelector.cjs 540 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. const types = require('../../tokenizer/types.cjs');
  3. const AMPERSAND = 0x0026; // U+0026 AMPERSAND (&)
  4. const name = 'NestingSelector';
  5. const structure = {
  6. };
  7. function parse() {
  8. const start = this.tokenStart;
  9. this.eatDelim(AMPERSAND);
  10. return {
  11. type: 'NestingSelector',
  12. loc: this.getLocation(start, this.tokenStart)
  13. };
  14. }
  15. function generate() {
  16. this.token(types.Delim, '&');
  17. }
  18. exports.generate = generate;
  19. exports.name = name;
  20. exports.parse = parse;
  21. exports.structure = structure;