main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
595 bytes
|
Rev | Line | |
---|
[d565449] | 1 | var WHITESPACE = require('../../tokenizer').TYPE.WhiteSpace;
|
---|
| 2 | var SPACE = Object.freeze({
|
---|
| 3 | type: 'WhiteSpace',
|
---|
| 4 | loc: null,
|
---|
| 5 | value: ' '
|
---|
| 6 | });
|
---|
| 7 |
|
---|
| 8 | module.exports = {
|
---|
| 9 | name: 'WhiteSpace',
|
---|
| 10 | structure: {
|
---|
| 11 | value: String
|
---|
| 12 | },
|
---|
| 13 | parse: function() {
|
---|
| 14 | this.eat(WHITESPACE);
|
---|
| 15 | return SPACE;
|
---|
| 16 |
|
---|
| 17 | // return {
|
---|
| 18 | // type: 'WhiteSpace',
|
---|
| 19 | // loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
|
---|
| 20 | // value: this.consume(WHITESPACE)
|
---|
| 21 | // };
|
---|
| 22 | },
|
---|
| 23 | generate: function(node) {
|
---|
| 24 | this.chunk(node.value);
|
---|
| 25 | }
|
---|
| 26 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.