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.
27 lines
595 B
27 lines
595 B
4 weeks ago
|
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);
|
||
|
}
|
||
|
};
|