MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / generate_cc_source

Function generate_cc_source

javascript/private/gen_file.py:123–146  ·  view source on GitHub ↗
(out, js_map, utf8, note)

Source from the content-addressed store, hash-verified

121
122
123def generate_cc_source(out, js_map, utf8, note):
124 out.write(
125 f"""{_copyright}
126
127{note}
128
129#include <stddef.h> // For NULL.
130#include "atoms.h"
131
132namespace webdriver {{
133namespace atoms {{
134
135"""
136 )
137
138 for name, file in js_map.items():
139 contents = open(file).read()
140 write_atom_literal(out, name, contents, "cc", utf8)
141
142 out.write("""
143} // namespace atoms
144} // namespace webdriver
145
146""")
147
148
149def generate_java_source(file_name, out, preamble, js_map, note):

Callers 1

mainFunction · 0.85

Calls 3

write_atom_literalFunction · 0.85
readMethod · 0.65
writeMethod · 0.45

Tested by

no test coverage detected