template-parser.js 510 B

1234567891011121314151617181920
  1. 'use strict';
  2. const helper = require('./template-parser-helper');
  3. const Parser = require('postcss/lib/parser');
  4. const templateTokenize = require('./template-tokenize');
  5. class TemplateParser extends Parser {
  6. createTokenizer() {
  7. this.tokenizer = templateTokenize(this.input);
  8. }
  9. other() {
  10. const args = arguments;
  11. return helper.literal.apply(this, args) || super.other.apply(this, args);
  12. }
  13. freeSemicolon() {
  14. return helper.freeSemicolon.apply(this, arguments);
  15. }
  16. }
  17. module.exports = TemplateParser;