source: imaps-frontend/node_modules/css-tree/lib/syntax/node/ClassSelector.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • 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.