MCPcopy Index your code
hub / github.com/lutzroeder/netron / parseAliasAnnotation

Method parseAliasAnnotation

source/python.js:11722–11745  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11720 return [fake_value, real_value, alias_info];
11721 }
11722 parseAliasAnnotation() {
11723 const L = this.L;
11724 let alias_info = null;
11725 if (L.nextIf('(')) {
11726 alias_info = new torch._C.AliasInfo();
11727 do {
11728 alias_info.addBeforeSet(L.cur().text());
11729 L.next();
11730 if (L.nextIf('!')) {
11731 alias_info.is_write = true;
11732 }
11733 }
11734 while (L.nextIf('|'));
11735 if (L.nextIf('->')) {
11736 do {
11737 alias_info.addAfterSet(L.cur().text());
11738 L.next();
11739 }
11740 while (L.nextIf('|'));
11741 }
11742 L.expect(')');
11743 }
11744 return alias_info;
11745 }
11746 });
11747 this.registerType('torch.Argument', class {
11748 constructor(...args) {

Callers 2

parseArgumentMethod · 0.80
parseFakeAndRealTypeMethod · 0.80

Calls 7

nextIfMethod · 0.80
addBeforeSetMethod · 0.80
textMethod · 0.80
curMethod · 0.80
addAfterSetMethod · 0.80
nextMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected