form improvements
This commit is contained in:
parent
c3fade12a9
commit
4b494ae07c
@ -16,8 +16,10 @@ class ObjectDefinitionParser(FileParser):
|
|||||||
if match:
|
if match:
|
||||||
self.mib_table.update({match.group(2): [match.group(1)]})
|
self.mib_table.update({match.group(2): [match.group(1)]})
|
||||||
|
|
||||||
def _handle_file_parsing_moving_window(self, file_name: str, current_line: int, moving_window_size: int,
|
def _handle_file_parsing_moving_window(
|
||||||
moving_window: list, *args, **kwargs):
|
self, file_name: str, current_line: int, moving_window_size: int,
|
||||||
|
moving_window: list, *args, **kwargs
|
||||||
|
):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _post_parsing_operation(self):
|
def _post_parsing_operation(self):
|
||||||
@ -35,7 +37,8 @@ def write_translation_file(filename: str, list_of_entries, date_string_full: str
|
|||||||
outputfile = open(filename, "w")
|
outputfile = open(filename, "w")
|
||||||
print('ObjectParser: Writing translation file ' + filename)
|
print('ObjectParser: Writing translation file ' + filename)
|
||||||
definitions = ""
|
definitions = ""
|
||||||
function = "const char* translateObject(object_id_t object) {\n\tswitch( (object & 0xFFFFFFFF) ) {\n"
|
function = "const char* translateObject(object_id_t object) " \
|
||||||
|
"{\n\tswitch( (object & 0xFFFFFFFF) ) {\n"
|
||||||
for entry in list_of_entries:
|
for entry in list_of_entries:
|
||||||
# first part of translate file
|
# first part of translate file
|
||||||
definitions += f"const char *{entry[1][0]}_STRING = \"{entry[1][0]}\";\n"
|
definitions += f"const char *{entry[1][0]}_STRING = \"{entry[1][0]}\";\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user