lix-website/themes/lix/assets/bootstrap/node_modules/@stylelint/postcss-css-in-js/template-safe-parser.js

20 lines
601 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
'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;