Do not halt on unterminated parameter list in C code

If we see an unterminated parameter list in the code being analyzed,
continue to warn, but treat it as an empty list and continue.
That say, we can try to process at least some of the code.

This fixes bug report #12 TypeError raised for incomplete source code
from philipp created: 2018-03-10.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
This commit is contained in:
David A. Wheeler 2018-09-30 20:43:13 -04:00
parent dbb7ef1622
commit fdd8a3bf47
1 changed files with 1 additions and 0 deletions

View File

@ -574,6 +574,7 @@ def extract_c_parameters(text, pos=0):
i = i + 1
internal_warn("Parsing failed to find end of parameter list in %s" %
text[pos:pos + 200])
return [] # Treat unterminated list as an empty list
# These patterns match gettext() and _() for internationalization.