diff --git a/cxxheaderparser/types.py b/cxxheaderparser/types.py index ebc15f9..0889abb 100644 --- a/cxxheaderparser/types.py +++ b/cxxheaderparser/types.py @@ -848,6 +848,7 @@ class Field: constexpr: bool = False mutable: bool = False static: bool = False + inline: bool = False doxygen: typing.Optional[str] = None diff --git a/tests/test_class.py b/tests/test_class.py index 2848690..9ddb96c 100644 --- a/tests/test_class.py +++ b/tests/test_class.py @@ -3336,3 +3336,40 @@ def test_constructor_outside_class() -> None: ] ) ) + + +def test_class_inline_static() -> None: + content = """ + struct X { + inline static bool Foo = 1; + }; + """ + data = parse_string(content, cleandoc=True) + + assert data == ParsedData( + namespace=NamespaceScope( + classes=[ + ClassScope( + class_decl=ClassDecl( + typename=PQName( + segments=[NameSpecifier(name="X")], classkey="struct" + ) + ), + fields=[ + Field( + access="public", + type=Type( + typename=PQName( + segments=[FundamentalSpecifier(name="bool")] + ) + ), + name="Foo", + value=Value(tokens=[Token(value="1")]), + static=True, + inline=True, + ) + ], + ) + ] + ) + )