astro-ghostcms/.pnpm-store/v3/files/9c/70fbd959e08863ed940f35da682...

26 lines
507 B
Plaintext

'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;