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

Method parseName

source/python.js:6124–6138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6122 this.type_parser = new torch._C.SchemaTypeParser(this.L, false, allow_typevars);
6123 }
6124 parseName() {
6125 const L = this.L;
6126 let name = L.expect('id').text();
6127 if (L.nextIf(':')) {
6128 L.expect(':');
6129 name = `${name}::${L.expect('ident').text()}`;
6130 }
6131 let overload_name = '';
6132 if (L.nextIf('.')) {
6133 overload_name = L.expect('ident').text();
6134 }
6135 // const is_a_valid_overload_name = !((overload_name === "default") || (overload_name.rfind("__", 0) == 0));
6136 // TORCH_CHECK(is_a_valid_overload_name, overload_name, " is not a legal overload name for aten operators");
6137 return new torch._C.OperatorName(name, overload_name);
6138 }
6139 parseDeclaration() {
6140 const L = this.L;
6141 const name = this.parseName();

Callers 1

parseDeclarationMethod · 0.80

Calls 3

textMethod · 0.80
nextIfMethod · 0.80
expectMethod · 0.45

Tested by

no test coverage detected