mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 06:49:29 +08:00
18 lines
406 B
Text
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 + '%');
|
|
}
|