Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
595 bytes
|
Line | |
---|
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.