From c06f7ee0a40255214c477e13d9b956a7e07c2900 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:05:55 +0800 Subject: postcss,(plugins): nanocss, postcss-preset-env --- .../css-tree/lib/syntax/node/ClassSelector.js | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 node_modules/css-tree/lib/syntax/node/ClassSelector.js (limited to 'node_modules/css-tree/lib/syntax/node/ClassSelector.js') diff --git a/node_modules/css-tree/lib/syntax/node/ClassSelector.js b/node_modules/css-tree/lib/syntax/node/ClassSelector.js new file mode 100644 index 00000000..febb0d96 --- /dev/null +++ b/node_modules/css-tree/lib/syntax/node/ClassSelector.js @@ -0,0 +1,24 @@ +import { Delim, Ident } from '../../tokenizer/index.js'; + +const FULLSTOP = 0x002E; // U+002E FULL STOP (.) + +// '.' ident +export const name = 'ClassSelector'; +export const structure = { + name: String +}; + +export function parse() { + this.eatDelim(FULLSTOP); + + return { + type: 'ClassSelector', + loc: this.getLocation(this.tokenStart - 1, this.tokenEnd), + name: this.consume(Ident) + }; +} + +export function generate(node) { + this.token(Delim, '.'); + this.token(Ident, node.name); +} -- cgit v1.2.3