blob: 78b75841754db910e6293e604ea64d91e8e4b6aa [file] [log] [blame]
var TYPE = require('../../tokenizer').TYPE;
var IDENTIFIER = TYPE.Identifier;
var FULLSTOP = TYPE.FullStop;
// '.' ident
module.exports = {
name: 'ClassSelector',
structure: {
name: String
},
parse: function() {
this.scanner.eat(FULLSTOP);
return {
type: 'ClassSelector',
loc: this.getLocation(this.scanner.tokenStart - 1, this.scanner.tokenEnd),
name: this.scanner.consume(IDENTIFIER)
};
},
generate: function(node) {
this.chunk('.');
this.chunk(node.name);
}
};