fix: inline namespace handling in header parser
`inline namespace` should be skipped in header parser namespaces list.
Example:
```cpp
namespace cv {
inline namespace inlined {
namespace inner {
// content
} // namespace inner
} // namespace inlined
} // namespace cv
```
Before fix `inner` is registered as `cv..inner`
After fix: `cv.inner`
This commit is contained in:
parent
9dd8e4df7f
commit
4d46958c82
@ -1002,7 +1002,7 @@ class CppHeaderParser(object):
|
||||
docstring = ""
|
||||
if stmt_type == "namespace":
|
||||
chunks = [block[1] for block in self.block_stack if block[0] == 'namespace'] + [name]
|
||||
self.namespaces.add('.'.join(chunks))
|
||||
self.namespaces.add('.'.join(filter(lambda c: len(c)> 0, chunks)))
|
||||
else:
|
||||
stmt_type, name, parse_flag = "block", "", False
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user