lang.cjs 820 B

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use strict';
  2. const types = require('../../tokenizer/types.cjs');
  3. function parseLanguageRangeList() {
  4. const children = this.createList();
  5. this.skipSC();
  6. loop: while (!this.eof) {
  7. switch (this.tokenType) {
  8. case types.Ident:
  9. children.push(this.Identifier());
  10. break;
  11. case types.String:
  12. children.push(this.String());
  13. break;
  14. case types.Comma:
  15. children.push(this.Operator());
  16. break;
  17. case types.RightParenthesis:
  18. break loop;
  19. default:
  20. this.error('Identifier, string or comma is expected');
  21. }
  22. this.skipSC();
  23. }
  24. return children;
  25. }
  26. exports.parseLanguageRangeList = parseLanguageRangeList;