mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 00:27:24 -04:00
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;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsInNvdXJjZSIsIm9wdHMiLCJpbnB1dCIsInBhcnNlciIsInRva2VucyIsInBhcnRzIiwibG9vcCIsInJvb3QiXSwibWFwcGluZ3MiOiI7OztrQkFPd0JBLEs7O0FBUHhCOzs7O0FBRUE7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7OztBQUVlLFNBQVNBLEtBQVQsQ0FBZUMsTUFBZixFQUF1QkMsSUFBdkIsRUFBNkI7QUFDe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