Urara-Blog/node_modules/.pnpm-store/v3/files/bb/eb176f50762e0dbe094af23aa885595ff27069b6bb20b24ffc10e98e711d5f9f6d74c1672f2e859017f9e655f9d1b159ef3c335a80a3b44ef7a55cd8d8b57a
2022-08-14 01:14:53 +08:00

18 lines
406 B
Text

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 + '%');
}