mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, minor formatting
This commit is contained in:
@@ -3370,8 +3370,7 @@ class ASTClass(ASTBase):
|
|||||||
|
|
||||||
|
|
||||||
class ASTUnion(ASTBase):
|
class ASTUnion(ASTBase):
|
||||||
def __init__(self, name: ASTNestedName,
|
def __init__(self, name: ASTNestedName, attrs: List[ASTAttribute]) -> None:
|
||||||
attrs: List[ASTAttribute]) -> None:
|
|
||||||
self.name = name
|
self.name = name
|
||||||
self.attrs = attrs
|
self.attrs = attrs
|
||||||
|
|
||||||
@@ -3397,8 +3396,7 @@ class ASTUnion(ASTBase):
|
|||||||
|
|
||||||
|
|
||||||
class ASTEnum(ASTBase):
|
class ASTEnum(ASTBase):
|
||||||
def __init__(self, name: ASTNestedName, scoped: str,
|
def __init__(self, name: ASTNestedName, scoped: str, underlyingType: ASTType,
|
||||||
underlyingType: ASTType,
|
|
||||||
attrs: List[ASTAttribute]) -> None:
|
attrs: List[ASTAttribute]) -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.scoped = scoped
|
self.scoped = scoped
|
||||||
|
|||||||
@@ -996,10 +996,9 @@ def test_domain_cpp_ast_attributes():
|
|||||||
# position: parameters and qualifiers
|
# position: parameters and qualifiers
|
||||||
check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f', 2: '1fv'})
|
check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f', 2: '1fv'})
|
||||||
|
|
||||||
# position: class
|
# position: class, union, enum
|
||||||
check('class', '{key}[[nodiscard]] Foo', {1: 'Foo', 2: '3Foo'}, key='class')
|
check('class', '{key}[[nodiscard]] Foo', {1: 'Foo', 2: '3Foo'}, key='class')
|
||||||
check('union', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='union')
|
check('union', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='union')
|
||||||
# position: enum
|
|
||||||
check('enum', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='enum')
|
check('enum', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='enum')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user