blob: 9042363defafd537f7fc97d1645fd2064c859ea5 [file] [log] [blame]
var TYPE = require('../../tokenizer').TYPE;
var IDENTIFIER = TYPE.Identifier;
module.exports = {
name: 'Identifier',
structure: {
name: String
},
parse: function() {
return {
type: 'Identifier',
loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
name: this.scanner.consume(IDENTIFIER)
};
},
generate: function(node) {
this.chunk(node.name);
}
};