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

export const name = 'Identifier';
export const structure = {
    name: String
};

export function parse() {
    return {
        type: 'Identifier',
        loc: this.getLocation(this.tokenStart, this.tokenEnd),
        name: this.consume(Ident)
    };
}

export function generate(node) {
    this.token(Ident, node.name);
}