source: trip-planner-front/node_modules/css-tree/lib/syntax/node/ClassSelector.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 673 bytes
Line 
1var TYPE = require('../../tokenizer').TYPE;
2
3var IDENT = TYPE.Ident;
4var FULLSTOP = 0x002E; // U+002E FULL STOP (.)
5
6// '.' ident
7module.exports = {
8 name: 'ClassSelector',
9 structure: {
10 name: String
11 },
12 parse: function() {
13 if (!this.scanner.isDelim(FULLSTOP)) {
14 this.error('Full stop is expected');
15 }
16
17 this.scanner.next();
18
19 return {
20 type: 'ClassSelector',
21 loc: this.getLocation(this.scanner.tokenStart - 1, this.scanner.tokenEnd),
22 name: this.consume(IDENT)
23 };
24 },
25 generate: function(node) {
26 this.chunk('.');
27 this.chunk(node.name);
28 }
29};
Note: See TracBrowser for help on using the repository browser.