MCPcopy
hub / github.com/lutzroeder/netron / _decorator

Method _decorator

source/python.js:1484–1495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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')) {

Callers 1

_parseStatementMethod · 0.80

Calls 4

_parseExpressionMethod · 0.80
acceptMethod · 0.45
_locationMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected