Urara-Blog/node_modules/.pnpm-store/v3/files/9c/70fbd959e08863ed940f35da682cc343742e3dfbbade4610f8ca20684d30febfa772d9d06377639b3a28ec0d5560257f303094e9d910b3934badc47725894c
2022-08-14 01:14:53 +08:00

25 lines
507 B
Text

'use strict';
const types = require('../../tokenizer/types.cjs');
const name = 'Percentage';
const structure = {
value: String
};
function parse() {
return {
type: 'Percentage',
loc: this.getLocation(this.tokenStart, this.tokenEnd),
value: this.consumeNumber(types.Percentage)
};
}
function generate(node) {
this.token(types.Percentage, node.value + '%');
}
exports.generate = generate;
exports.name = name;
exports.parse = parse;
exports.structure = structure;