|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
673 bytes
|
| Line | |
|---|
| 1 | var TYPE = require('../../tokenizer').TYPE;
|
|---|
| 2 |
|
|---|
| 3 | var IDENT = TYPE.Ident;
|
|---|
| 4 | var FULLSTOP = 0x002E; // U+002E FULL STOP (.)
|
|---|
| 5 |
|
|---|
| 6 | // '.' ident
|
|---|
| 7 | module.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.