and more form changes
This commit is contained in:
parent
75969c45ee
commit
9464739ae1
@ -66,11 +66,12 @@ class EventParser(FileParser):
|
||||
self, file_name: str, current_line: int, moving_window_size: int, moving_window: list,
|
||||
*args, **kwargs):
|
||||
subsystem_id_assignment_match = re.search(
|
||||
rf"([\w]*)[\s]*=[\s]*{SUBSYSTEM_ID_NAMESPACE}::([A-Z_0-9]*);", moving_window[self.moving_window_center_idx]
|
||||
rf"([\w]*)[\s]*=[\s]*{SUBSYSTEM_ID_NAMESPACE}::([A-Z_0-9]*);",
|
||||
moving_window[self.moving_window_center_idx]
|
||||
)
|
||||
if subsystem_id_assignment_match:
|
||||
# For now, it is assumed that there is only going to be one subsystem ID per class / source file
|
||||
# if "SUBSYSTEM_ID" in subsystem_id_assignment_match.group(1):
|
||||
# For now, it is assumed that there is only going to be one subsystem ID per
|
||||
# class / source file
|
||||
try:
|
||||
self.current_id = self.interfaces[subsystem_id_assignment_match.group(2)][0]
|
||||
self.my_id = self.return_number_from_string(self.current_id)
|
||||
@ -93,8 +94,8 @@ class EventParser(FileParser):
|
||||
macro_api_match = True
|
||||
if event_match:
|
||||
self.__handle_event_match(
|
||||
event_match=event_match, macro_api_match=macro_api_match, moving_window=moving_window,
|
||||
file_name=file_name
|
||||
event_match=event_match, macro_api_match=macro_api_match,
|
||||
moving_window=moving_window, file_name=file_name
|
||||
)
|
||||
|
||||
def __handle_event_match(
|
||||
|
@ -113,7 +113,8 @@ class InterfaceParser(FileParser):
|
||||
end_value = end_name_list[1]
|
||||
if end_name == target_end_name and end_value is not None:
|
||||
start_list_list_completed[idx][2] = end_value
|
||||
end_list_list_completed[idx][1] = end_value + start_list_list_completed[idx][3]
|
||||
end_list_list_completed[idx][1] = \
|
||||
end_value + start_list_list_completed[idx][3]
|
||||
all_indexes_filled = True
|
||||
for idx, start_name_list in enumerate(start_list_list_completed):
|
||||
if start_name_list[2] is None or end_name_list_list[idx][1] is None:
|
||||
@ -300,7 +301,8 @@ class ReturnValueParser(FileParser):
|
||||
for entry in list_of_entries.items():
|
||||
file.write(
|
||||
hex(entry[0]) + file_separator + entry[1][0] + file_separator + entry[1][1] +
|
||||
file_separator + entry[1][2] + file_separator + entry[1][3] + file_separator + entry[1][4] + '\n'
|
||||
file_separator + entry[1][2] + file_separator + entry[1][3] + file_separator +
|
||||
entry[1][4] + '\n'
|
||||
)
|
||||
file.close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user