lix-website/themes/lix/assets/bootstrap/node_modules/@stylelint/postcss-css-in-js/template-safe-parser.js
2024-04-26 22:49:34 -06:00

20 lines
601 B
JavaScript

'use strict';
const helper = require('./template-parser-helper');
// eslint-disable-next-line node/no-unpublished-require
const SafeParser = require('postcss-safe-parser/lib/safe-parser');
const templateTokenize = require('./template-tokenize');
class TemplateSafeParser extends SafeParser {
createTokenizer() {
this.tokenizer = templateTokenize(this.input, { ignoreErrors: true });
}
other(start) {
return helper.literal.call(this, start) || super.other.call(this, start);
}
freeSemicolon(token) {
return helper.freeSemicolon.call(this, token);
}
}
module.exports = TemplateSafeParser;