()
| 1482 | return null; |
| 1483 | } |
| 1484 | _decorator() { |
| 1485 | const list = []; |
| 1486 | while (this._tokenizer.accept('@')) { |
| 1487 | const value = this._parseExpression(); |
| 1488 | if (!value || (value instanceof ast.Call === false && value instanceof ast.Name === false && value instanceof ast.Attribute === false)) { |
| 1489 | throw new python.Error(`Invalid decorator ${this._location()}`); |
| 1490 | } |
| 1491 | this._tokenizer.accept('\n'); |
| 1492 | list.push(value); |
| 1493 | } |
| 1494 | return list; |
| 1495 | } |
| 1496 | _parseGenerators() { |
| 1497 | const generators = []; |
| 1498 | while (this._tokenizer.match('id', 'for') || this._tokenizer.match('id', 'async')) { |
no test coverage detected