parser.cjs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 'use strict';
  2. const index = require('../scope/index.cjs');
  3. const index$1 = require('../atrule/index.cjs');
  4. const index$2 = require('../pseudo/index.cjs');
  5. const indexParse = require('../node/index-parse.cjs');
  6. const config = {
  7. parseContext: {
  8. default: 'StyleSheet',
  9. stylesheet: 'StyleSheet',
  10. atrule: 'Atrule',
  11. atrulePrelude(options) {
  12. return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);
  13. },
  14. mediaQueryList: 'MediaQueryList',
  15. mediaQuery: 'MediaQuery',
  16. condition(options) {
  17. return this.Condition(options.kind);
  18. },
  19. rule: 'Rule',
  20. selectorList: 'SelectorList',
  21. selector: 'Selector',
  22. block() {
  23. return this.Block(true);
  24. },
  25. declarationList: 'DeclarationList',
  26. declaration: 'Declaration',
  27. value: 'Value'
  28. },
  29. features: {
  30. supports: {
  31. selector() {
  32. return this.Selector();
  33. }
  34. },
  35. container: {
  36. style() {
  37. return this.Declaration();
  38. }
  39. }
  40. },
  41. scope: index,
  42. atrule: index$1,
  43. pseudo: index$2,
  44. node: indexParse
  45. };
  46. module.exports = config;