site/node_modules/css-tree/lib/syntax/node/Number.js

19 lines
399 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
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);
}