mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
21 lines
441 B
JavaScript
21 lines
441 B
JavaScript
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);
|
|
}
|
|
};
|