aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/css-tree/lib/syntax/node/Number.js
blob: a9d8f0af219250cc288d6e2a57b33714ac29aa44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Number as NumberToken } from '../../tokenizer/index.js';

export const name = 'Number';
export const structure = {
    value: String
};

export function parse() {
    return {
        type: 'Number',
        loc: this.getLocation(this.tokenStart, this.tokenEnd),
        value: this.consume(NumberToken)
    };
}

export function generate(node) {
    this.token(NumberToken, node.value);
}