mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
27 lines
595 B
JavaScript
27 lines
595 B
JavaScript
var WHITESPACE = require('../../tokenizer').TYPE.WhiteSpace;
|
|
var SPACE = Object.freeze({
|
|
type: 'WhiteSpace',
|
|
loc: null,
|
|
value: ' '
|
|
});
|
|
|
|
module.exports = {
|
|
name: 'WhiteSpace',
|
|
structure: {
|
|
value: String
|
|
},
|
|
parse: function() {
|
|
this.eat(WHITESPACE);
|
|
return SPACE;
|
|
|
|
// return {
|
|
// type: 'WhiteSpace',
|
|
// loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
|
|
// value: this.consume(WHITESPACE)
|
|
// };
|
|
},
|
|
generate: function(node) {
|
|
this.chunk(node.value);
|
|
}
|
|
};
|