gh-81057: Get the c-analyzer tool working again. (gh-92246)

This commit is contained in:
Eric Snow 2022-05-03 13:18:27 -06:00 committed by GitHub
parent f03d3dd9af
commit 456cd513e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View file

@ -176,6 +176,7 @@ DECLARATOR = textwrap.dedent(rf'''
(?: # <IDENTIFIER>
{STRICT_IDENTIFIER}
)
# Inside the brackets is actually a "constant expression".
(?: \s* \[ (?: \s* [^\]]+ \s* )? [\]] )* # arrays
)
|
@ -184,6 +185,7 @@ DECLARATOR = textwrap.dedent(rf'''
(?: # <WRAPPED_IDENTIFIER>
{STRICT_IDENTIFIER}
)
# Inside the brackets is actually a "constant expression".
(?: \s* \[ (?: \s* [^\]]+ \s* )? [\]] )* # arrays
\s* [)]
)
@ -194,6 +196,7 @@ DECLARATOR = textwrap.dedent(rf'''
(?: # <FUNC_IDENTIFIER>
{STRICT_IDENTIFIER}
)
# Inside the brackets is actually a "constant expression".
(?: \s* \[ (?: \s* [^\]]+ \s* )? [\]] )* # arrays
\s* [)]
# We allow for a single level of paren nesting in parameters.
@ -322,7 +325,10 @@ STRUCT_MEMBER_DECL = textwrap.dedent(rf'''
(?:
\s* [:] \s*
(?: # <SIZE>
# This is actually a "constant expression".
\d+
|
[^'",}}]+
)
)?
\s*
@ -357,6 +363,7 @@ ENUM_MEMBER_DECL = textwrap.dedent(rf'''
(?:
\s* = \s*
(?: # <INIT>
# This is actually a "constant expression".
{_ind(STRING_LITERAL, 4)}
|
[^'",}}]+