astro-ghostcms/.pnpm-store/v3/files/bb/eb176f50762e0dbe094af23aa88...

19 lines
406 B
Plaintext

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