Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
source
OBSW MOD GENERATOR CORE
Commits
50b841ef
Commit
50b841ef
authored
Feb 25, 2021
by
Robin Mueller
Browse files
reenabled old code
parent
1587d976
Changes
1
Hide whitespace changes
Inline
Side-by-side
returnvalues/mib_returnvalues_parser.py
View file @
50b841ef
...
...
@@ -104,14 +104,14 @@ class ReturnValueParser(FileParser):
if
interface_id_match
:
self
.
__handle_interfaceid_match
(
interface_id_match
)
#returnvalue_match = re.search(
# r'^[\s]*static const(?:expr)? ReturnValue_t[\s]*([a-zA-Z_0-9]*)[\s]*=[\s]*'
# r'MAKE_RETURN_CODE[\s]*\([\s]*([x0-9a-fA-F]{1,4})[\s]*\);[\t ]*(//)?([^\n]*)',
# two_lines)
# Generic regex to match full returnvalue expression up until semicolon
returnvalue_match
=
re
.
search
(
r
"^[\s]*static const(?:expr)? ReturnValue_t.+?(?=;);"
,
two_lines
,
re
.
DOTALL
)
r
'^[\s]*static const(?:expr)? ReturnValue_t[\s]*([a-zA-Z_0-9]*)[\s]*=[\s]*'
r
'MAKE_RETURN_CODE[\s]*\([\s]*([x0-9a-fA-F]{1,4})[\s]*\);[\t ]*(//)?([^\n]*)'
,
two_lines
)
# Generic regex to match full returnvalue expression up until semicolon
# returnvalue_match = re.search(
# r"^[\s]*static const(?:expr)? ReturnValue_t.+?(?=;);", two_lines, re.DOTALL
#)
if
returnvalue_match
:
self
.
__handle_returnvalue_match
(
returnvalue_match
,
file_name
,
print_truncated_entries
)
self
.
last_lines
[
1
]
=
self
.
last_lines
[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment