small bugfix

This commit is contained in:
Robin Müller 2022-02-26 13:25:59 +01:00
parent 1be773a20f
commit 8c51049821
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -100,11 +100,11 @@ class EventParser(FileParser):
# Now try to look for event definitions. Moving windows allows multi line event definitions
# These two variants need to be checked
event_match = re.match(
r"[\s]*static const(?:expr)?[\s]*Event[\s]*([\w]*)[\s]*=",
r"[\s]*static const(?:expr)?[\s]*Event[\s]*([\w]*)[\s]*=([^\n]*)",
moving_window[self.moving_window_center_idx],
)
macro_api_match = False
for idx in range(0, 3):
for idx in range(3):
if "MAKE_EVENT" in moving_window[self.moving_window_center_idx + idx]:
macro_api_match = True
break
@ -285,7 +285,7 @@ def write_translation_source_file(
definitions = ""
function = (
"const char * translateEvents(Event event) {\n switch( (event & 0xffff) ) {\n"
"const char* translateEvents(Event event) {\n switch( (event & 0xFFFF) ) {\n"
)
for entry in event_list:
event_id = entry[0]