Unverified Commit d56e04c4 authored by Robin Mueller's avatar Robin Mueller
Browse files

Merge remote-tracking branch 'origin/mueller/master' into develop

parents e4a05183 410ec8b6
......@@ -76,13 +76,13 @@ 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]*([A-Z_0-9]*)[\s]*=[\s]*event::makeEvent[^\n]*",
r"[\s]*static const(?:expr)?[\s]*Event[\s]*([\w]*)[\s]*=[\s]*event::makeEvent[^\n]*",
moving_window[self.moving_window_center_idx]
)
macro_api_match = False
if not event_match:
event_match = re.match(
r"[\s]*static[\s]*const(?:expr)?[\s]*Event[\s]*([A-Z_0-9]*)[\s]*=[\s]*MAKE_EVENT[^\n]*",
r"[\s]*static[\s]*const(?:expr)?[\s]*Event[\s]*([\w]*)[\s]*=[\s]*MAKE_EVENT[^\n]*",
moving_window[self.moving_window_center_idx]
)
if event_match:
......@@ -116,12 +116,12 @@ class EventParser(FileParser):
if macro_api_match:
# One line event definition.
regex_string = \
r"static const(?:expr)? Event[\s]*([A-Z_0-9]*)[\s]*=[\s]*" \
r"MAKE_EVENT\(([0-9]{1,2}),[\s]*severity::([A-Z]*)\)[\s]*;"
r"static const(?:expr)? Event[\s]*([\w]*)[\s]*=[\s]*" \
r"MAKE_EVENT\(([0-9]{1,3}),[\s]*severity::([A-Z]*)\)[\s]*;"
else:
regex_string = \
r"static const(?:expr)? Event[\s]*([A-Z_0-9]*)[\s]*=[\s]*" \
r"event::makeEvent\(([\w]*),[\s]*([0-9]{1,2})[\s]*,[\s]*severity::([A-Z]*)\)[\s]*;"
r"static const(?:expr)? Event[\s]*([\w]*)[\s]*=[\s]*" \
r"event::makeEvent\(([\w]*),[\s]*([0-9]{1,3})[\s]*,[\s]*severity::([A-Z]*)\)[\s]*;"
event_full_match = re.search(regex_string, moving_window[self.moving_window_center_idx])
return event_full_match
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment