summaryrefslogtreecommitdiff
path: root/sphinx/domains/cpp.py
diff options
context:
space:
mode:
authorJakob Lykke Andersen <Jakob@caput.dk>2022-03-27 10:51:27 +0200
committerJakob Lykke Andersen <Jakob@caput.dk>2022-04-17 14:22:24 +0200
commitccfe08746ad19cbe04f603b84ab209172185b5d4 (patch)
tree332b2ee7103e4368d9426051cf3ed46891032306 /sphinx/domains/cpp.py
parenta36c09a97f4abd83e9534aec4906495be5cbbdd2 (diff)
downloadsphinx-git-ccfe08746ad19cbe04f603b84ab209172185b5d4.tar.gz
C++, var naming style in cond expr
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r--sphinx/domains/cpp.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index 23df1f7dd..4cc9295b9 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -1520,41 +1520,41 @@ class ASTBinOpExpr(ASTExpression):
class ASTConditionalExpr(ASTExpression):
- def __init__(self, if_expr: ASTExpression, then_expr: ASTExpression,
- else_expr: ASTExpression):
- self.if_expr = if_expr
- self.then_expr = then_expr
- self.else_expr = else_expr
+ def __init__(self, ifExpr: ASTExpression, thenExpr: ASTExpression,
+ elseExpr: ASTExpression):
+ self.ifExpr = ifExpr
+ self.thenExpr = thenExpr
+ self.elseExpr = elseExpr
def _stringify(self, transform: StringifyTransform) -> str:
res = []
- res.append(transform(self.if_expr))
+ res.append(transform(self.ifExpr))
res.append(' ? ')
- res.append(transform(self.then_expr))
+ res.append(transform(self.thenExpr))
res.append(' : ')
- res.append(transform(self.else_expr))
+ res.append(transform(self.elseExpr))
return ''.join(res)
def get_id(self, version: int) -> str:
assert version >= 2
res = []
res.append(_id_operator_v2['?'])
- res.append(self.if_expr.get_id(version))
- res.append(self.then_expr.get_id(version))
- res.append(self.else_expr.get_id(version))
+ res.append(self.ifExpr.get_id(version))
+ res.append(self.thenExpr.get_id(version))
+ res.append(self.elseExpr.get_id(version))
return ''.join(res)
def describe_signature(self, signode: TextElement, mode: str,
env: "BuildEnvironment", symbol: "Symbol") -> None:
- self.if_expr.describe_signature(signode, mode, env, symbol)
+ self.ifExpr.describe_signature(signode, mode, env, symbol)
signode += addnodes.desc_sig_space()
signode += addnodes.desc_sig_operator('?', '?')
signode += addnodes.desc_sig_space()
- self.then_expr.describe_signature(signode, mode, env, symbol)
+ self.thenExpr.describe_signature(signode, mode, env, symbol)
signode += addnodes.desc_sig_space()
signode += addnodes.desc_sig_operator(':', ':')
signode += addnodes.desc_sig_space()
- self.else_expr.describe_signature(signode, mode, env, symbol)
+ self.elseExpr.describe_signature(signode, mode, env, symbol)
class ASTBracedInitList(ASTBase):