Urara-Blog/node_modules/.pnpm-store/v3/files/73/7b7e4316022d205a93ae1ff62efddb14e4432f29a41e777b7613afe170cb382c51e04e97adf118aab32dd5b1a3d4b6746dd2966d2da9d761a7b838760841ad
2022-08-14 01:14:53 +08:00

31 lines
619 B
Text

'use strict';
const types = require('../../tokenizer/types.cjs');
const FULLSTOP = 0x002E; // U+002E FULL STOP (.)
// '.' ident
const name = 'ClassSelector';
const structure = {
name: String
};
function parse() {
this.eatDelim(FULLSTOP);
return {
type: 'ClassSelector',
loc: this.getLocation(this.tokenStart - 1, this.tokenEnd),
name: this.consume(types.Ident)
};
}
function generate(node) {
this.token(types.Delim, '.');
this.token(types.Ident, node.name);
}
exports.generate = generate;
exports.name = name;
exports.parse = parse;
exports.structure = structure;