site/node_modules/css-tree/lib/syntax/node/Number.js
2024-10-14 08:09:33 +02:00

19 lines
399 B
JavaScript

import { Number as NumberToken } from '../../tokenizer/index.js';
export const name = 'Number';
export const structure = {
value: String
};
export function parse() {
return {
type: 'Number',
loc: this.getLocation(this.tokenStart, this.tokenEnd),
value: this.consume(NumberToken)
};
}
export function generate(node) {
this.token(NumberToken, node.value);
}