Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Lykke Andersen <Jakob@caput.dk>2021-03-02 22:22:22 +0300
committerJakob Lykke Andersen <Jakob@caput.dk>2021-03-02 22:22:22 +0300
commit4052cbc9b157abd26fae7c4d0aedd233a21b98d5 (patch)
tree6860b41085a5f62e8869917d12b4b4b9158fa4af /sphinx/domains
parentb923165d5ef289ba39bb964201d4a036eb5a5ff6 (diff)
C++, support spaceship operator
Fixes sphinx-doc/sphinx#8942
Diffstat (limited to 'sphinx/domains')
-rw-r--r--sphinx/domains/cpp.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index cf93681ae..04b471b17 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -306,6 +306,7 @@ _operator_re = re.compile(r'''(?x)
| \+\+ | --
| ->\*? | \,
| (<<|>>)=? | && | \|\|
+ | <=>
| [!<>=/*%+|&^~-]=?
| (\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|xor|xor_eq)\b)
''')
@@ -494,6 +495,7 @@ _id_operator_v2 = {
'>': 'gt',
'<=': 'le',
'>=': 'ge',
+ '<=>': 'ss',
'!': 'nt', 'not': 'nt',
'&&': 'aa', 'and': 'aa',
'||': 'oo', 'or': 'oo',
@@ -528,7 +530,7 @@ _expression_bin_ops = [
['^', 'xor'],
['&', 'bitand'],
['==', '!=', 'not_eq'],
- ['<=', '>=', '<', '>'],
+ ['<=>', '<=', '>=', '<', '>'],
['<<', '>>'],
['+', '-'],
['*', '/', '%'],
@@ -5309,7 +5311,7 @@ class DefinitionParser(BaseParser):
# exclusive-or = and ^
# and = equality &
# equality = relational ==, !=
- # relational = shift <, >, <=, >=
+ # relational = shift <, >, <=, >=, <=>
# shift = additive <<, >>
# additive = multiplicative +, -
# multiplicative = pm *, /, %