mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
Bug: none Change-Id: I9389834400d90beed8df9f28356720031abe9ef1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6225902 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
42 lines
734 B
JavaScript
42 lines
734 B
JavaScript
'use strict';
|
|
|
|
const types = require('../../tokenizer/types.cjs');
|
|
|
|
const name = 'MediaQueryList';
|
|
const structure = {
|
|
children: [[
|
|
'MediaQuery'
|
|
]]
|
|
};
|
|
|
|
function parse() {
|
|
const children = this.createList();
|
|
|
|
this.skipSC();
|
|
|
|
while (!this.eof) {
|
|
children.push(this.MediaQuery());
|
|
|
|
if (this.tokenType !== types.Comma) {
|
|
break;
|
|
}
|
|
|
|
this.next();
|
|
}
|
|
|
|
return {
|
|
type: 'MediaQueryList',
|
|
loc: this.getLocationFromList(children),
|
|
children
|
|
};
|
|
}
|
|
|
|
function generate(node) {
|
|
this.children(node, () => this.token(types.Comma, ','));
|
|
}
|
|
|
|
exports.generate = generate;
|
|
exports.name = name;
|
|
exports.parse = parse;
|
|
exports.structure = structure;
|