MCPcopy Index your code
hub / github.com/nodejs/node / read_protocol_file

Method read_protocol_file

deps/inspector_protocol/code_generator.py:390–402  ·  view source on GitHub ↗
(self, file_name)

Source from the content-addressed store, hash-verified

388 self.generate_used_types()
389
390 def read_protocol_file(self, file_name):
391 input_file = open(file_name, "r")
392 parsed_json = pdl.loads(input_file.read(), file_name, False,
393 self.source_set)
394 input_file.close()
395 version = '%s.%s' % (parsed_json["version"]["major"],
396 parsed_json["version"]["minor"])
397 domains = []
398 for domain in parsed_json["domains"]:
399 domains.append(domain["domain"])
400 domain["version"] = version
401 self.json_api["domains"] += parsed_json["domains"]
402 return domains
403
404 def patch_full_qualified_refs(self):
405 def patch_full_qualified_refs_in_domain(json, domain_name):

Callers 1

__init__Method · 0.95

Calls 4

closeMethod · 0.65
openFunction · 0.50
readMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected