source: imaps-frontend/node_modules/css-tree/lib/syntax/node/IdSelector.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: 595 bytes
Line 
1var TYPE = require('../../tokenizer').TYPE;
2
3var HASH = TYPE.Hash;
4
5// <hash-token>
6module.exports = {
7 name: 'IdSelector',
8 structure: {
9 name: String
10 },
11 parse: function() {
12 var start = this.scanner.tokenStart;
13
14 // TODO: check value is an ident
15 this.eat(HASH);
16
17 return {
18 type: 'IdSelector',
19 loc: this.getLocation(start, this.scanner.tokenStart),
20 name: this.scanner.substrToCursor(start + 1)
21 };
22 },
23 generate: function(node) {
24 this.chunk('#');
25 this.chunk(node.name);
26 }
27};
Note: See TracBrowser for help on using the repository browser.