mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
scripts: apibuild: fix parsing block comments from typedef enum
Removed the TODO as we can rely to the serialize_typedef() the job to report missing comments. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
7958b7d9c5
commit
2f1c01e672
@ -1145,6 +1145,12 @@ class CParser:
|
|||||||
def parseTypedef(self, token):
|
def parseTypedef(self, token):
|
||||||
if token is None:
|
if token is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# With typedef enum types, we can have comments parsed before the
|
||||||
|
# enum themselves. The parsing of enum values does clear the
|
||||||
|
# self.comment variable. So we store it here for later.
|
||||||
|
typedef_comment = self.comment
|
||||||
|
|
||||||
token = self.parseType(token)
|
token = self.parseType(token)
|
||||||
if token is None:
|
if token is None:
|
||||||
self.error("parsing typedef")
|
self.error("parsing typedef")
|
||||||
@ -1168,7 +1174,7 @@ class CParser:
|
|||||||
"struct", type)
|
"struct", type)
|
||||||
base_type = "struct " + name
|
base_type = "struct " + name
|
||||||
else:
|
else:
|
||||||
# TODO report missing or misformatted comments
|
self.comment = typedef_comment
|
||||||
info = self.parseTypeComment(name, 1)
|
info = self.parseTypeComment(name, 1)
|
||||||
self.index_add(name, self.filename, not self.is_header,
|
self.index_add(name, self.filename, not self.is_header,
|
||||||
"typedef", type, info)
|
"typedef", type, info)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user