123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448 |
- 'use strict';
-
- exports.__esModule = true;
-
- var _declaration = require('postcss/lib/declaration');
-
- var _declaration2 = _interopRequireDefault(_declaration);
-
- var _comment = require('postcss/lib/comment');
-
- var _comment2 = _interopRequireDefault(_comment);
-
- var _atRule = require('postcss/lib/at-rule');
-
- var _atRule2 = _interopRequireDefault(_atRule);
-
- var _rule = require('postcss/lib/rule');
-
- var _rule2 = _interopRequireDefault(_rule);
-
- var _root = require('postcss/lib/root');
-
- var _root2 = _interopRequireDefault(_root);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- var Parser = function () {
- function Parser(input) {
- _classCallCheck(this, Parser);
-
- this.input = input;
-
- this.pos = 0;
- this.root = new _root2.default();
- this.current = this.root;
- this.spaces = '';
-
- this.extraIndent = false;
- this.prevIndent = undefined;
- this.step = undefined;
-
- this.root.source = { input: input, start: { line: 1, column: 1 } };
- }
-
- Parser.prototype.loop = function loop() {
- var part = void 0;
- while (this.pos < this.parts.length) {
- part = this.parts[this.pos];
-
- if (part.comment) {
- this.comment(part);
- } else if (part.atrule) {
- this.atrule(part);
- } else if (part.colon) {
- var next = this.nextNonComment(this.pos);
-
- if (next.end || next.atrule) {
- this.decl(part);
- } else {
- var moreIndent = next.indent.length > part.indent.length;
- if (!moreIndent) {
- this.decl(part);
- } else if (moreIndent && next.colon) {
- this.rule(part);
- } else if (moreIndent && !next.colon) {
- this.decl(part);
- }
- }
- } else if (part.end) {
- this.root.raws.after = part.before;
- } else {
- this.rule(part);
- }
-
- this.pos += 1;
- }
-
- for (var i = this.tokens.length - 1; i >= 0; i--) {
- if (this.tokens[i].length > 3) {
- var last = this.tokens[i];
- this.root.source.end = {
- line: last[4] || last[2],
- column: last[5] || last[3]
- };
- break;
- }
- }
- };
-
- Parser.prototype.comment = function comment(part) {
- var token = part.tokens[0];
- var node = new _comment2.default();
- this.init(node, part);
- node.source.end = { line: token[4], column: token[5] };
- this.commentText(node, token);
- };
-
- Parser.prototype.atrule = function atrule(part) {
- var atword = part.tokens[0];
- var params = part.tokens.slice(1);
-
- var node = new _atRule2.default();
- node.name = atword[1].slice(1);
- this.init(node, part);
-
- if (node.name === '') this.unnamedAtrule(atword);
-
- while (!part.end && part.lastComma) {
- this.pos += 1;
- part = this.parts[this.pos];
- params.push(['space', part.before + part.indent]);
- params = params.concat(part.tokens);
- }
-
- node.raws.afterName = this.firstSpaces(params);
- this.keepTrailingSpace(node, params);
- this.checkSemicolon(params);
- this.checkCurly(params);
- this.raw(node, 'params', params, atword);
- };
-
- Parser.prototype.decl = function decl(part) {
- var node = new _declaration2.default();
- this.init(node, part);
-
- var between = '';
- var colon = 0;
- var value = [];
- var prop = '';
- for (var i = 0; i < part.tokens.length; i++) {
- var token = part.tokens[i];
- if (token[0] === ':') {
- between += token[1];
- colon = token;
- value = part.tokens.slice(i + 1);
- break;
- } else if (token[0] === 'comment' || token[0] === 'space') {
- between += token[1];
- } else if (between !== '') {
- this.badProp(token);
- } else {
- prop += token[1];
- }
- }
-
- if (prop === '') this.unnamedDecl(part.tokens[0]);
- node.prop = prop;
-
- var next = this.parts[this.pos + 1];
-
- while (!next.end && !next.atrule && !next.colon && next.indent.length > part.indent.length) {
- value.push(['space', next.before + next.indent]);
- value = value.concat(next.tokens);
- this.pos += 1;
- next = this.parts[this.pos + 1];
- }
-
- var last = value[value.length - 1];
- if (last && last[0] === 'comment') {
- value.pop();
- var comment = new _comment2.default();
- this.current.push(comment);
- comment.source = {
- input: this.input,
- start: { line: last[2], column: last[3] },
- end: { line: last[4], column: last[5] }
- };
- var prev = value[value.length - 1];
- if (prev && prev[0] === 'space') {
- value.pop();
- comment.raws.before = prev[1];
- }
- this.commentText(comment, last);
- }
-
- for (var _i = value.length - 1; _i > 0; _i--) {
- var t = value[_i][0];
- if (t === 'word' && value[_i][1] === '!important') {
- node.important = true;
- if (_i > 0 && value[_i - 1][0] === 'space') {
- node.raws.important = value[_i - 1][1] + '!important';
- value.splice(_i - 1, 2);
- } else {
- node.raws.important = '!important';
- value.splice(_i, 1);
- }
- break;
- } else if (t !== 'space' && t !== 'newline' && t !== 'comment') {
- break;
- }
- }
-
- node.raws.between = between + this.firstSpaces(value);
- this.checkSemicolon(value);
- this.raw(node, 'value', value, colon);
- };
-
- Parser.prototype.rule = function rule(part) {
- var node = new _rule2.default();
- this.init(node, part);
-
- var selector = part.tokens;
- var next = this.parts[this.pos + 1];
-
- while (!next.end && next.indent.length === part.indent.length) {
- selector.push(['space', next.before + next.indent]);
- selector = selector.concat(next.tokens);
- this.pos += 1;
- next = this.parts[this.pos + 1];
- }
-
- this.keepTrailingSpace(node, selector);
- this.checkCurly(selector);
- this.raw(node, 'selector', selector);
- };
-
- /* Helpers */
-
- Parser.prototype.indent = function indent(part) {
- var indent = part.indent.length;
- var isPrev = typeof this.prevIndent !== 'undefined';
-
- if (!isPrev && indent) this.indentedFirstLine(part);
-
- if (!this.step && indent) {
- this.step = indent;
- this.root.raws.indent = part.indent;
- }
-
- if (isPrev && this.prevIndent !== indent) {
- var diff = indent - this.prevIndent;
- if (diff > 0) {
- if (diff !== this.step) {
- this.wrongIndent(this.prevIndent + this.step, indent, part);
- } else if (this.current.last.push) {
- this.current = this.current.last;
- } else {
- this.extraIndent = '';
- for (var i = 0; i < diff; i++) {
- this.extraIndent += ' ';
- }
- }
- } else if (diff % this.step !== 0) {
- var m = indent + diff % this.step;
- this.wrongIndent(m + ' or ' + (m + this.step), indent, part);
- } else {
- for (var _i2 = 0; _i2 < -diff / this.step; _i2++) {
- this.current = this.current.parent;
- }
- }
- }
-
- this.prevIndent = indent;
- };
-
- Parser.prototype.init = function init(node, part) {
- this.indent(part);
-
- if (!this.current.nodes) this.current.nodes = [];
- this.current.push(node);
-
- node.raws.before = part.before + part.indent;
- if (this.extraIndent) {
- node.raws.extraIndent = this.extraIndent;
- this.extraIndent = false;
- }
- node.source = {
- start: { line: part.tokens[0][2], column: part.tokens[0][3] },
- input: this.input
- };
- };
-
- Parser.prototype.checkCurly = function checkCurly(tokens) {
- for (var _iterator = tokens, _isArray = Array.isArray(_iterator), _i3 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i3 >= _iterator.length) break;
- _ref = _iterator[_i3++];
- } else {
- _i3 = _iterator.next();
- if (_i3.done) break;
- _ref = _i3.value;
- }
-
- var token = _ref;
-
- if (token[0] === '{') {
- this.error('Unnecessary curly bracket', token[2], token[3]);
- }
- }
- };
-
- Parser.prototype.checkSemicolon = function checkSemicolon(tokens) {
- for (var _iterator2 = tokens, _isArray2 = Array.isArray(_iterator2), _i4 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i4 >= _iterator2.length) break;
- _ref2 = _iterator2[_i4++];
- } else {
- _i4 = _iterator2.next();
- if (_i4.done) break;
- _ref2 = _i4.value;
- }
-
- var token = _ref2;
-
- if (token[0] === ';') {
- this.error('Unnecessary semicolon', token[2], token[3]);
- }
- }
- };
-
- Parser.prototype.keepTrailingSpace = function keepTrailingSpace(node, tokens) {
- var lastSpace = tokens[tokens.length - 1];
- if (lastSpace && lastSpace[0] === 'space') {
- tokens.pop();
- node.raws.sssBetween = lastSpace[1];
- }
- };
-
- Parser.prototype.firstSpaces = function firstSpaces(tokens) {
- var result = '';
- for (var i = 0; i < tokens.length; i++) {
- if (tokens[i][0] === 'space' || tokens[i][0] === 'newline') {
- result += tokens.shift()[1];
- i -= 1;
- } else {
- break;
- }
- }
- return result;
- };
-
- Parser.prototype.raw = function raw(node, prop, tokens, altLast) {
- var token = void 0,
- type = void 0;
- var length = tokens.length;
- var value = '';
- var clean = true;
- for (var i = 0; i < length; i += 1) {
- token = tokens[i];
- type = token[0];
- if (type === 'comment' || type === 'space' && i === length - 1) {
- clean = false;
- } else {
- value += token[1];
- }
- }
- if (!clean) {
- var sss = tokens.reduce(function (all, i) {
- return all + i[1];
- }, '');
- var raw = tokens.reduce(function (all, i) {
- if (i[0] === 'comment' && i[6] === 'inline') {
- return all + '/* ' + i[1].slice(2).trim() + ' */';
- } else {
- return all + i[1];
- }
- }, '');
- node.raws[prop] = { value: value, raw: raw };
- if (sss !== raw) node.raws[prop].sss = sss;
- }
- node[prop] = value;
-
- var last = void 0;
- for (var _i5 = tokens.length - 1; _i5 >= 0; _i5--) {
- if (tokens[_i5].length > 2) {
- last = tokens[_i5];
- break;
- }
- }
- if (!last) last = altLast;
-
- node.source.end = {
- line: last[4] || last[2],
- column: last[5] || last[3]
- };
- };
-
- Parser.prototype.nextNonComment = function nextNonComment(pos) {
- var next = pos;
- var part = void 0;
- while (next < this.parts.length) {
- next += 1;
- part = this.parts[next];
- if (part.end || !part.comment) break;
- }
- return part;
- };
-
- Parser.prototype.commentText = function commentText(node, token) {
- var text = token[1];
- if (token[6] === 'inline') {
- node.raws.inline = true;
- text = text.slice(2);
- } else {
- text = text.slice(2, -2);
- }
-
- var match = text.match(/^(\s*)([^]*[^\s])(\s*)\n?$/);
- if (match) {
- node.text = match[2];
- node.raws.left = match[1];
- node.raws.inlineRight = match[3];
- } else {
- node.text = '';
- node.raws.left = '';
- node.raws.inlineRight = '';
- }
- };
-
- // Errors
-
- Parser.prototype.error = function error(msg, line, column) {
- throw this.input.error(msg, line, column);
- };
-
- Parser.prototype.unnamedAtrule = function unnamedAtrule(token) {
- this.error('At-rule without name', token[2], token[3]);
- };
-
- Parser.prototype.unnamedDecl = function unnamedDecl(token) {
- this.error('Declaration without name', token[2], token[3]);
- };
-
- Parser.prototype.indentedFirstLine = function indentedFirstLine(part) {
- this.error('First line should not have indent', part.number, 1);
- };
-
- Parser.prototype.wrongIndent = function wrongIndent(expected, real, part) {
- var msg = 'Expected ' + expected + ' indent, but get ' + real;
- this.error(msg, part.number, 1);
- };
-
- Parser.prototype.badProp = function badProp(token) {
- this.error('Unexpected separator in property', token[2], token[3]);
- };
-
- return Parser;
- }();
-
- exports.default = Parser;
- module.exports = exports['default'];
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlci5lczYiXSwibmFtZXMiOlsiUGFyc2VyIiwiaW5wdXQiLCJwb3MiLCJyb290IiwiUm9vdCIsImN1cnJlbnQiLCJzcGFjZXMiLCJleHRyYUluZGVudCIsInByZXZJbmRlbnQiLCJ1bmRlZmluZWQiLCJzdGVwIiwic291cmNlIiwic3RhcnQiLCJsaW5lIiwiY29sdW1uIiwibG9vcCIsInBhcnQiLCJwYXJ0cyIsImxlbmd0aCIsImNvbW1lbnQiLCJhdHJ1bGUiLCJjb2xvbiIsIm5leHQiLCJuZXh0Tm9uQ29tbWVudCIsImVuZCIsImRlY2wiLCJtb3JlSW5kZW50IiwiaW5kZW50IiwicnVsZSIsInJhd3MiLCJhZnRlciIsImJlZm9yZSIsImkiLCJ0b2tlbnMiLCJsYXN0IiwidG9rZW4iLCJub2RlIiwiQ29tbWVudCIsImluaXQiLCJjb21tZW50VGV4dCIsImF0d29yZCIsInBhcmFtcyIsInNsaWNlIiwiQXRSdWxlIiwib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7XG4gICAgICAgICAgbGV0IG1vcmVJbmRlbnQgPSBuZXh0LmluZGVudC5sZW5ndGggPiBwYXJ0LmluZGVudC5sZW5ndGhcbiAgICAgICAgICBpZiAoIW1vcmVJbmRlbnQpIHtcbiAgICAgICAgICAgIHRoaXMuZGVjbChwYXJ0KVxuICAgICAgICAgIH0gZWxzZSBpZiAobW9yZUluZGVudCAmJiBuZXh0LmNvbG9uKSB7XG4gICAgICAgICAgICB0aGlzLnJ1bGUocGFydClcbiAgICAgICAgICB9IGVsc2UgaWYgKG1vcmVJbmRlbnQgJiYgIW5leHQuY29sb24pIHtcbiAgICAgICAgICAgIHRoaXMuZGVjbChwYXJ0KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChwYXJ0LmVuZCkge1xuICAgICAgICB0aGlzLnJvb3QucmF3cy5hZnRlciA9IHBhcnQuYmVmb3JlXG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnJ1bGUocGFydClcbiAgICAgIH1cblxuICAgICAgdGhpcy5wb3MgKz0gMVxuICAgIH1cblxuICAgIGZvciAobGV0IGkgPSB0aGlzLnRva2Vucy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgaWYgKHRoaXMudG9rZW5zW2ldLmxlbmd0aCA+IDMpIHtcbiAgICAgICAgbGV0IGxhc3QgPSB0aGlzLnRva2Vuc1tpXVxuICAgICAgICB0aGlzLnJvb3Quc291cmNlLmVuZCA9IHtcbiAgICAgICAgICBsaW5lOiBsYXN0WzRdIHx8IGxhc3RbMl0sXG4gICAgICAgICAgY29sdW1uOiBsYXN0WzVdIHx8IGxhc3RbM11cbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIGNvbW1lbnQgKHBhcnQpIHtcbiAgICBsZXQgdG9rZW4gPSBwYXJ0LnRva2Vuc1swXVxuICAgIGxldCBub2RlID0gbmV3IENvbW1lbnQoKVxuICAgIHR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tcbiAgICAgICAgICB0aGlzLmV4dHJhSW5kZW50ID0gJydcbiAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRpZmY7IGkrKykge1xuICAgICAgICAgICAgdGhpcy5leHRyYUluZGVudCArPSAnICdcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoZGlmZiAlIHRoaXMuc3RlcCAhPT0gMCkge1xuICAgICAgICBsZXQgbSA9IGluZGVudCArIGRpZmYgJSB0aGlzLnN0ZXBcbiAgICAgICAgdGhpcy53cm9uZ0luZGVudChgJHsgbSB9IG9yICR7IG0gKyB0aGlzLnN0ZXAgfWAsIGluZGVudCwgcGFydClcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgLWRpZmYgLyB0aGlzLnN0ZXA7IGkrKykge1xuICAgICAgICAgIHRoaXMuY3VycmVudCA9IHRoaXMuY3VycmVudC5wYXJlbnRcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMucHJldkluZGVudCA9IGluZGVudFxuICB9XG5cbiAgaW5pdCAobm9kZSwgcGFydCkge1xuICAgIHRoaXMuaW5kZW50KHBhcnQpXG5cbiAgICBpZiAoIXRoaXMuY3VycmVudC5ub2RlcykgdGhpcy5jdXJyZW50Lm5vZGVzID0gW11cbiAgICB0aGlzLmN1cnJlbnQucHVzaChub2RlKVxuXG4gICAgbm9kZS5yYXdzLmJlZm9yZSA9IHBhcnQuYmVmb3JlICsgcGFydC5pbmRlbnRcbiAgICBpZiAodGhpcy5leHRyYUluZGVudCkge1xuICAgICAgbm9kZS5yYXdzLmV4dHJhSW5kZW50ID0gdGhpcy5leHRyYUluZGVudFxuICAgICAgdGhpcy5leHRyYUluZGVudCA9IGZhbHNlXG4gICAgfVxuICAgIG5vZGUuc291cmNlID0ge1xuICAgICAgc3RhcnQ6IHsgbGluZTogcGFydC50b2tlbnNbMF1bMl0sIGNvbHVtbjogcGFydC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ClbMV1cbiAgICAgICAgaSAtPSAxXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBicmVha1xuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gcmVzdWx0XG4gIH1cblxuICByYXcgKG5vZGUsIHByb3AsIHRva2VucywgYWx0TGFzdCkge1xuICAgIGxldCB0b2tlbiwgdHlwZVxuICAgIGxldCBsZW5ndGggPSB0b2tlbnMubGVuZ3RoXG4gICAgbGV0IHZhbHVlID0gJydcbiAgICBsZXQgY2xlYW4gPSB0cnVlXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW5ndGg7IGkgKz0gMSkge1xuICAgICAgdG9rZW4gPSB0b2tlbnNbaV1cbiAgICAgIHR5cGUgPSB0b2tlblswXVxuICAgICAgaWYgKHR5cGUgPT09ICdjb21tZW50JyB8fCAodHlwZSA9PT0gJ3NwYWNlJyAmJiBpID09PSBsZW5ndGggLSAxKSkge1xuICAgICAgICBjbGVhbiA9IGZhbHNlXG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YWx1ZSArPSB0b2tlblsxXVxuICAgICAgfVxuICAgIH1cbiAgICBpZiAoIWNsZWFuKSB7XG4gICAgICBsZXQgc3NzID0gdG9rZW5zLnJlZHVjZSgoYWxsLCBpKSA9PiBhbGwgKyBpWzFdLCAnJylcbiAgICAgIGxldCByYXcgPSB0b2tlbnMucmVkdWNlKChhbGwsIGkpID0+IHtcbiAgICAgICAgaWYgKGlbMF0gPT09ICdjb21tZW50JyAmJiBpWzZdID09PSAnaW5saW5lJykge1xuICAgICAgICAgIHJldHVybiBhbGwgKyAnLyogJyArIGlbMV0uc2xpY2UoMikudHJpbSgpICsgJyAqLydcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR1cm4gYWxsICsgaVsxXVxuICAgICAgICB9XG4gICAgICB9LCAnJylcbiAgICAgIG5vZGUucmF3c1twcm9wXSA9IHsgdmFsdWUsIHJhdyB9XG4gICAgICBpZiAoc3NzICE9PSByYXcpIG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