/
asias
/
new
Обзор
Документация
Войти
/
asias
/
new
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/css-tree/lib/syntax/node/SelectorList.js
39 строк
825 B
AnastasyaDemina
project
07 дек 2025, 23:03
07 дек 2025, 23:03
7c21e25
Код
Авторство
О чём код?
var TYPE = require('../../tokenizer').TYPE; var COMMA = TYPE.Comma; module.exports = { name: 'SelectorList', structure: { children: [[ 'Selector', 'Raw' ]] }, parse: function() { var children = this.createList(); while (!this.scanner.eof) { children.push(this.Selector()); if (this.scanner.tokenType === COMMA) { this.scanner.next(); continue; } break; } return { type: 'SelectorList', loc: this.getLocationFromList(children), children: children }; }, generate: function(node) { this.children(node, function() { this.chunk(','); }); }, walkContext: 'selector' };