Urara-Blog/node_modules/.pnpm-store/v3/files/a1/879ef97f0c8e460b3b789b5c09391f26436ad913b64fc81099ba6cda62513c1622d38d047705952916bf278d6e5547cd6b48237bef4b4893016b50aa2a1e2d
2022-08-14 01:14:53 +08:00

27 lines
543 B
Text

import { WhiteSpace } from '../../tokenizer/index.js';
const SPACE = Object.freeze({
type: 'WhiteSpace',
loc: null,
value: ' '
});
export const name = 'WhiteSpace';
export const structure = {
value: String
};
export function parse() {
this.eat(WhiteSpace);
return SPACE;
// return {
// type: 'WhiteSpace',
// loc: this.getLocation(this.tokenStart, this.tokenEnd),
// value: this.consume(WHITESPACE)
// };
}
export function generate(node) {
this.token(WhiteSpace, node.value);
}