You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
820 B
JavaScript
38 lines
820 B
JavaScript
'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;
|