From f81c144252995f84bf433f92d6e489f82ab0fed9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 21 Jun 2021 12:57:07 +0200 Subject: [PATCH] description parsing working --- events/event_parser.py | 4 +++- parserbase/parser.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/events/event_parser.py b/events/event_parser.py index 18d7e7f..5b8f0e5 100644 --- a/events/event_parser.py +++ b/events/event_parser.py @@ -110,7 +110,9 @@ class EventParser(FileParser): first_line=event_match.group(0), moving_window=moving_window ) # Description will be parsed separately later - description = " " + description = self._search_for_descrip_string_generic( + moving_window=moving_window, break_pattern=r'[\s]*static const(?:expr)?[\s]*Event[\s]*' + ) if event_full_match: name = event_match.group(EVENT_NAME_IDX) if macro_api_match: diff --git a/parserbase/parser.py b/parserbase/parser.py index 35ae89a..a258977 100644 --- a/parserbase/parser.py +++ b/parserbase/parser.py @@ -247,6 +247,6 @@ class FileParser: else: return "" resulting_description = re.search( - r"\[EXPORT][\s]*:[\s]*\[COMMENT](.*)", descrip_string + r"\[EXPORT][\s]*:[\s]*\[COMMENT][\s](.*)", descrip_string ) return resulting_description.group(1)