aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/css-tree/cjs/syntax/pseudo/lang.cjs
blob: 6b80ee12fee60370418a895fccabe791e04e5bd1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';

const types = require('../../tokenizer/types.cjs');

function parseLanguageRangeList() {
    const children = this.createList();

    this.skipSC();

    loop: while (!this.eof) {
        switch (this.tokenType) {
            case types.Ident:
                children.push(this.Identifier());
                break;

            case types.String:
                children.push(this.String());
                break;

            case types.Comma:
                children.push(this.Operator());
                break;

            case types.RightParenthesis:
                break loop;

            default:
                this.error('Identifier, string or comma is expected');
        }

        this.skipSC();
    }

    return children;
}

exports.parseLanguageRangeList = parseLanguageRangeList;