()
| 1339 | } |
| 1340 | |
| 1341 | parseArray() { |
| 1342 | this.pos++; // consume '<' |
| 1343 | this.skipWhitespace(); |
| 1344 | const values = []; |
| 1345 | |
| 1346 | while (this.pos < this.length) { |
| 1347 | this.skipWhitespace(); |
| 1348 | |
| 1349 | if (this.content.charCodeAt(this.pos) === GT) { |
| 1350 | this.pos++; |
| 1351 | break; |
| 1352 | } |
| 1353 | |
| 1354 | const code = this.content.charCodeAt(this.pos); |
| 1355 | |
| 1356 | if (code === AMPERSAND) { |
| 1357 | this.pos++; |
| 1358 | this.skipWhitespace(); |
| 1359 | values.push('&' + this.parseIdentifier()); |
| 1360 | } else if (this.isDigit(code) || (code === ZERO && this.pos + 1 < this.length && this.content.charCodeAt(this.pos + 1) === 120)) { // 'x' |
| 1361 | values.push(this.parseNumber()); |
| 1362 | } else if (this.isIdentifierStart(code)) { |
| 1363 | values.push(this.parseIdentifier()); |
| 1364 | } else { |
| 1365 | this.pos++; |
| 1366 | } |
| 1367 | |
| 1368 | this.skipWhitespace(); |
| 1369 | } |
| 1370 | |
| 1371 | return values; |
| 1372 | } |
| 1373 | |
| 1374 | parseNumber() { |
| 1375 | const startPos = this.pos; |
no test coverage detected