site/node_modules/css-tree/cjs/syntax/node/Number.cjs

26 lines
479 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
'use strict';
const types = require('../../tokenizer/types.cjs');
const name = 'Number';
const structure = {
value: String
};
function parse() {
return {
type: 'Number',
loc: this.getLocation(this.tokenStart, this.tokenEnd),
value: this.consume(types.Number)
};
}
function generate(node) {
this.token(types.Number, node.value);
}
exports.generate = generate;
exports.name = name;
exports.parse = parse;
exports.structure = structure;