forked from lix-project/lix-website
39 lines
2.3 KiB
JavaScript
39 lines
2.3 KiB
JavaScript
|
'use strict';
|
||
|
|
||
|
exports.__esModule = true;
|
||
|
exports.default = parse;
|
||
|
|
||
|
var _input = require('postcss/lib/input');
|
||
|
|
||
|
var _input2 = _interopRequireDefault(_input);
|
||
|
|
||
|
var _preprocess = require('./preprocess');
|
||
|
|
||
|
var _preprocess2 = _interopRequireDefault(_preprocess);
|
||
|
|
||
|
var _tokenize = require('./tokenize');
|
||
|
|
||
|
var _tokenize2 = _interopRequireDefault(_tokenize);
|
||
|
|
||
|
var _parser = require('./parser');
|
||
|
|
||
|
var _parser2 = _interopRequireDefault(_parser);
|
||
|
|
||
|
var _liner = require('./liner');
|
||
|
|
||
|
var _liner2 = _interopRequireDefault(_liner);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
function parse(source, opts) {
|
||
|
var input = new _input2.default(source, opts);
|
||
|
|
||
|
var parser = new _parser2.default(input);
|
||
|
parser.tokens = (0, _tokenize2.default)(input);
|
||
|
parser.parts = (0, _preprocess2.default)(input, (0, _liner2.default)(parser.tokens));
|
||
|
parser.loop();
|
||
|
|
||
|
return parser.root;
|
||
|
}
|
||
|
module.exports = exports['default'];
|
||
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsInNvdXJjZSIsIm9wdHMiLCJpbnB1dCIsIklucHV0IiwicGFyc2VyIiwiUGFyc2VyIiwidG9rZW5zIiwicGFydHMiLCJsb29wIiwicm9vdCJdLCJtYXBwaW5ncyI6Ijs7O2tCQU93QkEsSzs7QUFQeEI7Ozs7QUFFQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBRWUsU0FBU0EsS0FBVCxDQUFnQkMsTUFBaEIsRUFBd0JDLElBQXhCLEVBQThC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