You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
441 B

var TYPE = require('../../tokenizer').TYPE;
var IDENT = TYPE.Ident;
module.exports = {
name: 'Identifier',
structure: {
name: String
},
parse: function() {
return {
type: 'Identifier',
loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
name: this.consume(IDENT)
};
},
generate: function(node) {
this.chunk(node.name);
}
};