Sphinx 7.2.6__py3-none-any.whl → 7.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Sphinx might be problematic. Click here for more details.
- sphinx/__init__.py +8 -9
- sphinx/addnodes.py +31 -28
- sphinx/application.py +9 -15
- sphinx/builders/__init__.py +5 -6
- sphinx/builders/_epub_base.py +17 -9
- sphinx/builders/changes.py +10 -5
- sphinx/builders/dirhtml.py +4 -2
- sphinx/builders/dummy.py +3 -2
- sphinx/builders/epub3.py +5 -3
- sphinx/builders/gettext.py +24 -7
- sphinx/builders/html/__init__.py +88 -96
- sphinx/builders/html/_assets.py +16 -16
- sphinx/builders/html/transforms.py +4 -2
- sphinx/builders/latex/__init__.py +40 -33
- sphinx/builders/latex/nodes.py +6 -2
- sphinx/builders/latex/transforms.py +17 -8
- sphinx/builders/latex/util.py +1 -1
- sphinx/builders/linkcheck.py +86 -27
- sphinx/builders/manpage.py +8 -6
- sphinx/builders/singlehtml.py +5 -4
- sphinx/builders/texinfo.py +18 -14
- sphinx/builders/text.py +3 -2
- sphinx/builders/xml.py +5 -2
- sphinx/cmd/build.py +119 -76
- sphinx/cmd/make_mode.py +4 -9
- sphinx/cmd/quickstart.py +13 -16
- sphinx/config.py +432 -250
- sphinx/deprecation.py +23 -13
- sphinx/directives/__init__.py +8 -8
- sphinx/directives/code.py +7 -7
- sphinx/directives/other.py +23 -13
- sphinx/directives/patches.py +7 -6
- sphinx/domains/__init__.py +2 -2
- sphinx/domains/c/__init__.py +796 -0
- sphinx/domains/c/_ast.py +1421 -0
- sphinx/domains/c/_ids.py +65 -0
- sphinx/domains/c/_parser.py +1048 -0
- sphinx/domains/c/_symbol.py +700 -0
- sphinx/domains/changeset.py +11 -7
- sphinx/domains/citation.py +5 -2
- sphinx/domains/cpp/__init__.py +1089 -0
- sphinx/domains/cpp/_ast.py +3635 -0
- sphinx/domains/cpp/_ids.py +537 -0
- sphinx/domains/cpp/_parser.py +2117 -0
- sphinx/domains/cpp/_symbol.py +1092 -0
- sphinx/domains/index.py +6 -4
- sphinx/domains/javascript.py +16 -13
- sphinx/domains/math.py +9 -4
- sphinx/domains/python/__init__.py +890 -0
- sphinx/domains/python/_annotations.py +507 -0
- sphinx/domains/python/_object.py +426 -0
- sphinx/domains/rst.py +12 -7
- sphinx/domains/{std.py → std/__init__.py} +19 -16
- sphinx/environment/__init__.py +21 -19
- sphinx/environment/adapters/indexentries.py +2 -2
- sphinx/environment/adapters/toctree.py +10 -9
- sphinx/environment/collectors/__init__.py +6 -3
- sphinx/environment/collectors/asset.py +4 -3
- sphinx/environment/collectors/dependencies.py +3 -2
- sphinx/environment/collectors/metadata.py +6 -5
- sphinx/environment/collectors/title.py +3 -2
- sphinx/environment/collectors/toctree.py +5 -4
- sphinx/errors.py +13 -2
- sphinx/events.py +14 -9
- sphinx/ext/apidoc.py +9 -11
- sphinx/ext/autodoc/__init__.py +105 -71
- sphinx/ext/autodoc/directive.py +7 -6
- sphinx/ext/autodoc/importer.py +102 -36
- sphinx/ext/autodoc/mock.py +7 -5
- sphinx/ext/autodoc/preserve_defaults.py +4 -3
- sphinx/ext/autodoc/type_comment.py +2 -1
- sphinx/ext/autodoc/typehints.py +5 -4
- sphinx/ext/autosectionlabel.py +3 -2
- sphinx/ext/autosummary/__init__.py +21 -17
- sphinx/ext/autosummary/generate.py +9 -9
- sphinx/ext/coverage.py +26 -20
- sphinx/ext/doctest.py +38 -33
- sphinx/ext/duration.py +1 -0
- sphinx/ext/extlinks.py +4 -3
- sphinx/ext/githubpages.py +3 -2
- sphinx/ext/graphviz.py +10 -7
- sphinx/ext/ifconfig.py +5 -5
- sphinx/ext/imgconverter.py +6 -5
- sphinx/ext/imgmath.py +9 -8
- sphinx/ext/inheritance_diagram.py +31 -31
- sphinx/ext/intersphinx.py +140 -23
- sphinx/ext/linkcode.py +3 -2
- sphinx/ext/mathjax.py +2 -1
- sphinx/ext/napoleon/__init__.py +12 -7
- sphinx/ext/napoleon/docstring.py +34 -32
- sphinx/ext/todo.py +10 -7
- sphinx/ext/viewcode.py +12 -11
- sphinx/extension.py +18 -8
- sphinx/highlighting.py +39 -20
- sphinx/io.py +17 -8
- sphinx/jinja2glue.py +16 -15
- sphinx/locale/__init__.py +30 -23
- sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.po +818 -761
- sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bg/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bn/LC_MESSAGES/sphinx.po +835 -778
- sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ca/LC_MESSAGES/sphinx.po +864 -807
- sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cak/LC_MESSAGES/sphinx.po +816 -759
- sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cs/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cy/LC_MESSAGES/sphinx.po +819 -762
- sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/da/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/el/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +856 -799
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eo/LC_MESSAGES/sphinx.po +820 -763
- sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es/LC_MESSAGES/sphinx.po +856 -799
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/et/LC_MESSAGES/sphinx.po +845 -788
- sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eu/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fa/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fi/LC_MESSAGES/sphinx.po +816 -759
- sphinx/locale/fr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr/LC_MESSAGES/sphinx.po +904 -847
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/gl/LC_MESSAGES/sphinx.js +54 -54
- sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/gl/LC_MESSAGES/sphinx.po +1506 -1449
- sphinx/locale/he/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/he/LC_MESSAGES/sphinx.po +823 -766
- sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hr/LC_MESSAGES/sphinx.po +844 -787
- sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hu/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/id/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/is/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/it/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ja/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ka/LC_MESSAGES/sphinx.po +848 -791
- sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ko/LC_MESSAGES/sphinx.po +855 -798
- sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lt/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lv/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/mk/LC_MESSAGES/sphinx.po +825 -768
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js +27 -27
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +876 -818
- sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ne/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nl/LC_MESSAGES/sphinx.po +844 -787
- sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pl/LC_MESSAGES/sphinx.po +845 -788
- sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +908 -851
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ro/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ru/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/si/LC_MESSAGES/sphinx.po +823 -766
- sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sk/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sl/LC_MESSAGES/sphinx.po +832 -775
- sphinx/locale/sphinx.pot +813 -755
- sphinx/locale/sq/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sq/LC_MESSAGES/sphinx.po +865 -808
- sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr/LC_MESSAGES/sphinx.po +835 -778
- sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr_RS/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ta/LC_MESSAGES/sphinx.js +54 -54
- sphinx/locale/ta/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ta/LC_MESSAGES/sphinx.po +1530 -1473
- sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/te/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/tr/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +833 -776
- sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ur/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/vi/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/yue/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +855 -798
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +879 -822
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +811 -754
- sphinx/parsers.py +7 -5
- sphinx/project.py +18 -11
- sphinx/pycode/__init__.py +6 -5
- sphinx/pycode/ast.py +23 -8
- sphinx/pycode/parser.py +6 -5
- sphinx/registry.py +12 -6
- sphinx/roles.py +103 -57
- sphinx/search/__init__.py +17 -18
- sphinx/search/da.py +2 -2
- sphinx/search/de.py +2 -2
- sphinx/search/en.py +1 -1
- sphinx/search/es.py +2 -2
- sphinx/search/fi.py +2 -2
- sphinx/search/fr.py +2 -2
- sphinx/search/hu.py +2 -2
- sphinx/search/it.py +2 -2
- sphinx/search/ja.py +13 -22
- sphinx/search/nl.py +2 -2
- sphinx/search/no.py +2 -2
- sphinx/search/pt.py +2 -2
- sphinx/search/ro.py +1 -1
- sphinx/search/ru.py +2 -2
- sphinx/search/sv.py +2 -2
- sphinx/search/tr.py +1 -1
- sphinx/search/zh.py +2 -3
- sphinx/templates/graphviz/graphviz.css +1 -1
- sphinx/testing/fixtures.py +41 -24
- sphinx/testing/path.py +1 -1
- sphinx/testing/util.py +142 -53
- sphinx/texinputs/sphinx.xdy +1 -1
- sphinx/texinputs/sphinxlatextables.sty +1 -1
- sphinx/texinputs/sphinxpackagesubstitutefont.sty +21 -0
- sphinx/themes/agogo/layout.html +4 -4
- sphinx/themes/agogo/static/agogo.css_t +1 -1
- sphinx/themes/agogo/theme.toml +22 -0
- sphinx/themes/basic/defindex.html +1 -1
- sphinx/themes/basic/domainindex.html +1 -1
- sphinx/themes/basic/genindex-single.html +1 -1
- sphinx/themes/basic/genindex-split.html +1 -1
- sphinx/themes/basic/genindex.html +1 -1
- sphinx/themes/basic/globaltoc.html +1 -1
- sphinx/themes/basic/layout.html +1 -1
- sphinx/themes/basic/localtoc.html +1 -1
- sphinx/themes/basic/page.html +1 -1
- sphinx/themes/basic/relations.html +1 -1
- sphinx/themes/basic/search.html +5 -20
- sphinx/themes/basic/searchbox.html +3 -3
- sphinx/themes/basic/searchfield.html +3 -3
- sphinx/themes/basic/sourcelink.html +1 -1
- sphinx/themes/basic/static/basic.css_t +1 -1
- sphinx/themes/basic/static/doctools.js +1 -1
- sphinx/themes/basic/static/language_data.js_t +2 -2
- sphinx/themes/basic/static/searchtools.js +105 -60
- sphinx/themes/basic/theme.toml +23 -0
- sphinx/themes/bizstyle/layout.html +1 -6
- sphinx/themes/bizstyle/static/bizstyle.css_t +1 -1
- sphinx/themes/bizstyle/static/bizstyle.js_t +1 -1
- sphinx/themes/bizstyle/static/css3-mediaqueries_src.js +3 -3
- sphinx/themes/bizstyle/theme.toml +12 -0
- sphinx/themes/classic/layout.html +1 -1
- sphinx/themes/classic/static/classic.css_t +1 -1
- sphinx/themes/classic/static/sidebar.js_t +1 -1
- sphinx/themes/classic/theme.toml +34 -0
- sphinx/themes/default/theme.toml +2 -0
- sphinx/themes/epub/epub-cover.html +1 -1
- sphinx/themes/epub/layout.html +1 -1
- sphinx/themes/epub/static/epub.css_t +1 -1
- sphinx/themes/epub/theme.toml +10 -0
- sphinx/themes/haiku/layout.html +3 -3
- sphinx/themes/haiku/static/haiku.css_t +2 -2
- sphinx/themes/haiku/theme.toml +16 -0
- sphinx/themes/nature/static/nature.css_t +1 -1
- sphinx/themes/nature/theme.toml +6 -0
- sphinx/themes/nonav/layout.html +1 -1
- sphinx/themes/nonav/static/nonav.css_t +1 -1
- sphinx/themes/nonav/theme.toml +10 -0
- sphinx/themes/pyramid/static/epub.css_t +1 -1
- sphinx/themes/pyramid/static/pyramid.css_t +1 -1
- sphinx/themes/pyramid/theme.toml +6 -0
- sphinx/themes/scrolls/artwork/logo.svg +1 -1
- sphinx/themes/scrolls/layout.html +2 -2
- sphinx/themes/scrolls/static/scrolls.css_t +1 -1
- sphinx/themes/scrolls/theme.toml +15 -0
- sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +1 -1
- sphinx/themes/sphinxdoc/theme.toml +6 -0
- sphinx/themes/traditional/static/traditional.css_t +1 -1
- sphinx/themes/traditional/theme.toml +9 -0
- sphinx/theming.py +427 -131
- sphinx/transforms/__init__.py +21 -24
- sphinx/transforms/compact_bullet_list.py +5 -5
- sphinx/transforms/i18n.py +30 -28
- sphinx/transforms/post_transforms/__init__.py +9 -7
- sphinx/transforms/post_transforms/code.py +4 -1
- sphinx/transforms/post_transforms/images.py +17 -13
- sphinx/transforms/references.py +3 -1
- sphinx/util/__init__.py +15 -11
- sphinx/util/_io.py +34 -0
- sphinx/util/_pathlib.py +23 -18
- sphinx/util/build_phase.py +1 -0
- sphinx/util/cfamily.py +19 -11
- sphinx/util/console.py +101 -21
- sphinx/util/display.py +3 -2
- sphinx/util/docfields.py +12 -8
- sphinx/util/docutils.py +21 -35
- sphinx/util/exceptions.py +3 -2
- sphinx/util/fileutil.py +5 -5
- sphinx/util/http_date.py +9 -2
- sphinx/util/i18n.py +40 -9
- sphinx/util/inspect.py +317 -245
- sphinx/util/inventory.py +22 -5
- sphinx/util/logging.py +81 -7
- sphinx/util/matching.py +2 -1
- sphinx/util/math.py +1 -2
- sphinx/util/nodes.py +39 -29
- sphinx/util/osutil.py +25 -6
- sphinx/util/parallel.py +6 -1
- sphinx/util/requests.py +8 -5
- sphinx/util/rst.py +8 -6
- sphinx/util/tags.py +3 -3
- sphinx/util/template.py +8 -3
- sphinx/util/typing.py +76 -42
- sphinx/versioning.py +6 -2
- sphinx/writers/html.py +1 -1
- sphinx/writers/html5.py +17 -13
- sphinx/writers/latex.py +12 -12
- sphinx/writers/manpage.py +13 -7
- sphinx/writers/texinfo.py +13 -10
- sphinx/writers/text.py +13 -23
- sphinx/writers/xml.py +1 -1
- sphinx-7.2.6.dist-info/LICENSE → sphinx-7.3.0.dist-info/LICENSE.rst +1 -1
- {sphinx-7.2.6.dist-info → sphinx-7.3.0.dist-info}/METADATA +13 -12
- sphinx-7.3.0.dist-info/RECORD +581 -0
- sphinx/domains/c.py +0 -3906
- sphinx/domains/cpp.py +0 -8233
- sphinx/domains/python.py +0 -1769
- sphinx/themes/agogo/theme.conf +0 -20
- sphinx/themes/basic/theme.conf +0 -16
- sphinx/themes/bizstyle/theme.conf +0 -10
- sphinx/themes/classic/theme.conf +0 -32
- sphinx/themes/default/theme.conf +0 -2
- sphinx/themes/epub/theme.conf +0 -8
- sphinx/themes/haiku/theme.conf +0 -14
- sphinx/themes/nature/theme.conf +0 -4
- sphinx/themes/nonav/theme.conf +0 -8
- sphinx/themes/pyramid/theme.conf +0 -4
- sphinx/themes/scrolls/theme.conf +0 -13
- sphinx/themes/sphinxdoc/theme.conf +0 -4
- sphinx/themes/traditional/theme.conf +0 -7
- sphinx-7.2.6.dist-info/RECORD +0 -569
- {sphinx-7.2.6.dist-info → sphinx-7.3.0.dist-info}/WHEEL +0 -0
- {sphinx-7.2.6.dist-info → sphinx-7.3.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Important note on ids
|
|
3
|
+
----------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
Multiple id generation schemes are used due to backwards compatibility.
|
|
6
|
+
- v1: 1.2.3 <= version < 1.3
|
|
7
|
+
The style used before the rewrite.
|
|
8
|
+
It is not the actual old code, but a replication of the behaviour.
|
|
9
|
+
- v2: 1.3 <= version < now
|
|
10
|
+
Standardised mangling scheme from
|
|
11
|
+
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling
|
|
12
|
+
though not completely implemented.
|
|
13
|
+
All versions are generated and attached to elements. The newest is used for
|
|
14
|
+
the index. All of the versions should work as permalinks.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Signature Nodes and Tagnames
|
|
18
|
+
----------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
Each signature is in a desc_signature node, where all children are
|
|
21
|
+
desc_signature_line nodes. Each of these lines will have the attribute
|
|
22
|
+
'sphinx_line_type' set to one of the following (prioritized):
|
|
23
|
+
- 'declarator', if the line contains the name of the declared object.
|
|
24
|
+
- 'templateParams', if the line starts a template parameter list,
|
|
25
|
+
- 'templateParams', if the line has template parameters
|
|
26
|
+
Note: such lines might get a new tag in the future.
|
|
27
|
+
- 'templateIntroduction, if the line is on the form 'conceptName{...}'
|
|
28
|
+
No other desc_signature nodes should exist (so far).
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Grammar
|
|
32
|
+
----------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
See https://www.nongnu.org/hcb/ for the grammar,
|
|
35
|
+
and https://github.com/cplusplus/draft/blob/master/source/grammar.tex,
|
|
36
|
+
and https://github.com/cplusplus/concepts-ts
|
|
37
|
+
for the newest grammar.
|
|
38
|
+
|
|
39
|
+
common grammar things:
|
|
40
|
+
template-declaration ->
|
|
41
|
+
"template" "<" template-parameter-list ">" declaration
|
|
42
|
+
template-parameter-list ->
|
|
43
|
+
template-parameter
|
|
44
|
+
| template-parameter-list "," template-parameter
|
|
45
|
+
template-parameter ->
|
|
46
|
+
type-parameter
|
|
47
|
+
| parameter-declaration # i.e., same as a function argument
|
|
48
|
+
|
|
49
|
+
type-parameter ->
|
|
50
|
+
"class" "..."[opt] identifier[opt]
|
|
51
|
+
| "class" identifier[opt] "=" type-id
|
|
52
|
+
| "typename" "..."[opt] identifier[opt]
|
|
53
|
+
| "typename" identifier[opt] "=" type-id
|
|
54
|
+
| "template" "<" template-parameter-list ">"
|
|
55
|
+
"class" "..."[opt] identifier[opt]
|
|
56
|
+
| "template" "<" template-parameter-list ">"
|
|
57
|
+
"class" identifier[opt] "=" id-expression
|
|
58
|
+
# also, from C++17 we can have "typename" in template templates
|
|
59
|
+
templateDeclPrefix ->
|
|
60
|
+
"template" "<" template-parameter-list ">"
|
|
61
|
+
|
|
62
|
+
simple-declaration ->
|
|
63
|
+
attribute-specifier-seq[opt] decl-specifier-seq[opt]
|
|
64
|
+
init-declarator-list[opt] ;
|
|
65
|
+
# Make the semicolon optional.
|
|
66
|
+
# For now: drop the attributes (TODO).
|
|
67
|
+
# Use at most 1 init-declarator.
|
|
68
|
+
-> decl-specifier-seq init-declarator
|
|
69
|
+
-> decl-specifier-seq declarator initializer
|
|
70
|
+
|
|
71
|
+
decl-specifier ->
|
|
72
|
+
storage-class-specifier ->
|
|
73
|
+
( "static" (only for member_object and function_object)
|
|
74
|
+
| "extern" (only for member_object and function_object)
|
|
75
|
+
| "register"
|
|
76
|
+
)
|
|
77
|
+
thread_local[opt] (only for member_object)
|
|
78
|
+
(it can also appear before the others)
|
|
79
|
+
|
|
80
|
+
| type-specifier -> trailing-type-specifier
|
|
81
|
+
| function-specifier -> "inline" | "virtual" | "explicit" (only
|
|
82
|
+
for function_object)
|
|
83
|
+
| "friend" (only for function_object)
|
|
84
|
+
| "constexpr" (only for member_object and function_object)
|
|
85
|
+
trailing-type-specifier ->
|
|
86
|
+
simple-type-specifier
|
|
87
|
+
| elaborated-type-specifier
|
|
88
|
+
| typename-specifier
|
|
89
|
+
| cv-qualifier -> "const" | "volatile"
|
|
90
|
+
stricter grammar for decl-specifier-seq (with everything, each object
|
|
91
|
+
uses a subset):
|
|
92
|
+
visibility storage-class-specifier function-specifier "friend"
|
|
93
|
+
"constexpr" "volatile" "const" trailing-type-specifier
|
|
94
|
+
# where trailing-type-specifier can no be cv-qualifier
|
|
95
|
+
# Inside e.g., template parameters a strict subset is used
|
|
96
|
+
# (see type-specifier-seq)
|
|
97
|
+
trailing-type-specifier ->
|
|
98
|
+
simple-type-specifier ->
|
|
99
|
+
::[opt] nested-name-specifier[opt] type-name
|
|
100
|
+
| ::[opt] nested-name-specifier "template" simple-template-id
|
|
101
|
+
| "char" | "bool" | etc.
|
|
102
|
+
| decltype-specifier
|
|
103
|
+
| elaborated-type-specifier ->
|
|
104
|
+
class-key attribute-specifier-seq[opt] ::[opt]
|
|
105
|
+
nested-name-specifier[opt] identifier
|
|
106
|
+
| class-key ::[opt] nested-name-specifier[opt] template[opt]
|
|
107
|
+
simple-template-id
|
|
108
|
+
| "enum" ::[opt] nested-name-specifier[opt] identifier
|
|
109
|
+
| typename-specifier ->
|
|
110
|
+
"typename" ::[opt] nested-name-specifier identifier
|
|
111
|
+
| "typename" ::[opt] nested-name-specifier template[opt]
|
|
112
|
+
simple-template-id
|
|
113
|
+
class-key -> "class" | "struct" | "union"
|
|
114
|
+
type-name ->* identifier | simple-template-id
|
|
115
|
+
# ignoring attributes and decltype, and then some left-factoring
|
|
116
|
+
trailing-type-specifier ->
|
|
117
|
+
rest-of-trailing
|
|
118
|
+
("class" | "struct" | "union" | "typename") rest-of-trailing
|
|
119
|
+
built-in -> "char" | "bool" | etc.
|
|
120
|
+
decltype-specifier
|
|
121
|
+
rest-of-trailing -> (with some simplification)
|
|
122
|
+
"::"[opt] list-of-elements-separated-by-::
|
|
123
|
+
element ->
|
|
124
|
+
"template"[opt] identifier ("<" template-argument-list ">")[opt]
|
|
125
|
+
template-argument-list ->
|
|
126
|
+
template-argument "..."[opt]
|
|
127
|
+
| template-argument-list "," template-argument "..."[opt]
|
|
128
|
+
template-argument ->
|
|
129
|
+
constant-expression
|
|
130
|
+
| type-specifier-seq abstract-declarator
|
|
131
|
+
| id-expression
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
declarator ->
|
|
135
|
+
ptr-declarator
|
|
136
|
+
| noptr-declarator parameters-and-qualifiers trailing-return-type
|
|
137
|
+
ptr-declarator ->
|
|
138
|
+
noptr-declarator
|
|
139
|
+
| ptr-operator ptr-declarator
|
|
140
|
+
noptr-declarator ->
|
|
141
|
+
declarator-id attribute-specifier-seq[opt] ->
|
|
142
|
+
"..."[opt] id-expression
|
|
143
|
+
| rest-of-trailing
|
|
144
|
+
| noptr-declarator parameters-and-qualifiers
|
|
145
|
+
| noptr-declarator "[" constant-expression[opt] "]"
|
|
146
|
+
attribute-specifier-seq[opt]
|
|
147
|
+
| "(" ptr-declarator ")"
|
|
148
|
+
ptr-operator ->
|
|
149
|
+
"*" attribute-specifier-seq[opt] cv-qualifier-seq[opt]
|
|
150
|
+
| "& attribute-specifier-seq[opt]
|
|
151
|
+
| "&&" attribute-specifier-seq[opt]
|
|
152
|
+
| "::"[opt] nested-name-specifier "*" attribute-specifier-seq[opt]
|
|
153
|
+
cv-qualifier-seq[opt]
|
|
154
|
+
# function_object must use a parameters-and-qualifiers, the others may
|
|
155
|
+
# use it (e.g., function pointers)
|
|
156
|
+
parameters-and-qualifiers ->
|
|
157
|
+
"(" parameter-clause ")" attribute-specifier-seq[opt]
|
|
158
|
+
cv-qualifier-seq[opt] ref-qualifier[opt]
|
|
159
|
+
exception-specification[opt]
|
|
160
|
+
ref-qualifier -> "&" | "&&"
|
|
161
|
+
exception-specification ->
|
|
162
|
+
"noexcept" ("(" constant-expression ")")[opt]
|
|
163
|
+
"throw" ("(" type-id-list ")")[opt]
|
|
164
|
+
# TODO: we don't implement attributes
|
|
165
|
+
# member functions can have initializers, but we fold them into here
|
|
166
|
+
memberFunctionInit -> "=" "0"
|
|
167
|
+
# (note: only "0" is allowed as the value, according to the standard,
|
|
168
|
+
# right?)
|
|
169
|
+
|
|
170
|
+
enum-head ->
|
|
171
|
+
enum-key attribute-specifier-seq[opt] nested-name-specifier[opt]
|
|
172
|
+
identifier enum-base[opt]
|
|
173
|
+
enum-key -> "enum" | "enum struct" | "enum class"
|
|
174
|
+
enum-base ->
|
|
175
|
+
":" type
|
|
176
|
+
enumerator-definition ->
|
|
177
|
+
identifier
|
|
178
|
+
| identifier "=" constant-expression
|
|
179
|
+
|
|
180
|
+
We additionally add the possibility for specifying the visibility as the
|
|
181
|
+
first thing.
|
|
182
|
+
|
|
183
|
+
concept_object:
|
|
184
|
+
goal:
|
|
185
|
+
just a declaration of the name (for now)
|
|
186
|
+
|
|
187
|
+
grammar: only a single template parameter list, and the nested name
|
|
188
|
+
may not have any template argument lists
|
|
189
|
+
|
|
190
|
+
"template" "<" template-parameter-list ">"
|
|
191
|
+
nested-name-specifier
|
|
192
|
+
|
|
193
|
+
type_object:
|
|
194
|
+
goal:
|
|
195
|
+
either a single type (e.g., "MyClass:Something_T" or a typedef-like
|
|
196
|
+
thing (e.g. "Something Something_T" or "int I_arr[]"
|
|
197
|
+
grammar, single type: based on a type in a function parameter, but
|
|
198
|
+
without a name:
|
|
199
|
+
parameter-declaration
|
|
200
|
+
-> attribute-specifier-seq[opt] decl-specifier-seq
|
|
201
|
+
abstract-declarator[opt]
|
|
202
|
+
# Drop the attributes
|
|
203
|
+
-> decl-specifier-seq abstract-declarator[opt]
|
|
204
|
+
grammar, typedef-like: no initializer
|
|
205
|
+
decl-specifier-seq declarator
|
|
206
|
+
Can start with a templateDeclPrefix.
|
|
207
|
+
|
|
208
|
+
member_object:
|
|
209
|
+
goal: as a type_object which must have a declarator, and optionally
|
|
210
|
+
with a initializer
|
|
211
|
+
grammar:
|
|
212
|
+
decl-specifier-seq declarator initializer
|
|
213
|
+
Can start with a templateDeclPrefix.
|
|
214
|
+
|
|
215
|
+
function_object:
|
|
216
|
+
goal: a function declaration, TODO: what about templates? for now: skip
|
|
217
|
+
grammar: no initializer
|
|
218
|
+
decl-specifier-seq declarator
|
|
219
|
+
Can start with a templateDeclPrefix.
|
|
220
|
+
|
|
221
|
+
class_object:
|
|
222
|
+
goal: a class declaration, but with specification of a base class
|
|
223
|
+
grammar:
|
|
224
|
+
attribute-specifier-seq[opt]
|
|
225
|
+
nested-name "final"[opt] (":" base-specifier-list)[opt]
|
|
226
|
+
base-specifier-list ->
|
|
227
|
+
base-specifier "..."[opt]
|
|
228
|
+
| base-specifier-list, base-specifier "..."[opt]
|
|
229
|
+
base-specifier ->
|
|
230
|
+
base-type-specifier
|
|
231
|
+
| "virtual" access-spe"cifier[opt] base-type-specifier
|
|
232
|
+
| access-specifier[opt] "virtual"[opt] base-type-specifier
|
|
233
|
+
Can start with a templateDeclPrefix.
|
|
234
|
+
|
|
235
|
+
enum_object:
|
|
236
|
+
goal: an unscoped enum or a scoped enum, optionally with the underlying
|
|
237
|
+
type specified
|
|
238
|
+
grammar:
|
|
239
|
+
("class" | "struct")[opt] visibility[opt]
|
|
240
|
+
attribute-specifier-seq[opt] nested-name (":" type)[opt]
|
|
241
|
+
enumerator_object:
|
|
242
|
+
goal: an element in a scoped or unscoped enum. The name should be
|
|
243
|
+
injected according to the scopedness.
|
|
244
|
+
grammar:
|
|
245
|
+
nested-name ("=" constant-expression)
|
|
246
|
+
|
|
247
|
+
namespace_object:
|
|
248
|
+
goal: a directive to put all following declarations in a specific scope
|
|
249
|
+
grammar:
|
|
250
|
+
nested-name
|
|
251
|
+
"""
|
|
252
|
+
|
|
253
|
+
from __future__ import annotations
|
|
254
|
+
|
|
255
|
+
import re
|
|
256
|
+
|
|
257
|
+
udl_identifier_re = re.compile(r'''
|
|
258
|
+
[a-zA-Z_][a-zA-Z0-9_]*\b # note, no word boundary in the beginning
|
|
259
|
+
''', re.VERBOSE)
|
|
260
|
+
_string_re = re.compile(r"[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'"
|
|
261
|
+
r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.DOTALL)
|
|
262
|
+
_visibility_re = re.compile(r'\b(public|private|protected)\b')
|
|
263
|
+
_operator_re = re.compile(r'''
|
|
264
|
+
\[\s*\]
|
|
265
|
+
| \(\s*\)
|
|
266
|
+
| \+\+ | --
|
|
267
|
+
| ->\*? | \,
|
|
268
|
+
| (<<|>>)=? | && | \|\|
|
|
269
|
+
| <=>
|
|
270
|
+
| [!<>=/*%+|&^~-]=?
|
|
271
|
+
| (\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|xor|xor_eq)\b)
|
|
272
|
+
''', re.VERBOSE)
|
|
273
|
+
_fold_operator_re = re.compile(r'''
|
|
274
|
+
->\* | \.\* | \,
|
|
275
|
+
| (<<|>>)=? | && | \|\|
|
|
276
|
+
| !=
|
|
277
|
+
| [<>=/*%+|&^~-]=?
|
|
278
|
+
''', re.VERBOSE)
|
|
279
|
+
# see https://en.cppreference.com/w/cpp/keyword
|
|
280
|
+
_keywords = [
|
|
281
|
+
'alignas', 'alignof', 'and', 'and_eq', 'asm', 'auto', 'bitand', 'bitor',
|
|
282
|
+
'bool', 'break', 'case', 'catch', 'char', 'char8_t', 'char16_t', 'char32_t',
|
|
283
|
+
'class', 'compl', 'concept', 'const', 'consteval', 'constexpr', 'constinit',
|
|
284
|
+
'const_cast', 'continue',
|
|
285
|
+
'decltype', 'default', 'delete', 'do', 'double', 'dynamic_cast', 'else',
|
|
286
|
+
'enum', 'explicit', 'export', 'extern', 'false', 'float', 'for', 'friend',
|
|
287
|
+
'goto', 'if', 'inline', 'int', 'long', 'mutable', 'namespace', 'new',
|
|
288
|
+
'noexcept', 'not', 'not_eq', 'nullptr', 'operator', 'or', 'or_eq',
|
|
289
|
+
'private', 'protected', 'public', 'register', 'reinterpret_cast',
|
|
290
|
+
'requires', 'return', 'short', 'signed', 'sizeof', 'static',
|
|
291
|
+
'static_assert', 'static_cast', 'struct', 'switch', 'template', 'this',
|
|
292
|
+
'thread_local', 'throw', 'true', 'try', 'typedef', 'typeid', 'typename',
|
|
293
|
+
'union', 'unsigned', 'using', 'virtual', 'void', 'volatile', 'wchar_t',
|
|
294
|
+
'while', 'xor', 'xor_eq',
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
_simple_type_specifiers_re = re.compile(r"""
|
|
299
|
+
\b(
|
|
300
|
+
auto|void|bool
|
|
301
|
+
|signed|unsigned
|
|
302
|
+
|short|long
|
|
303
|
+
|char|wchar_t|char(8|16|32)_t
|
|
304
|
+
|int
|
|
305
|
+
|__int(64|128) # extension
|
|
306
|
+
|float|double
|
|
307
|
+
|__float80|_Float64x|__float128|_Float128 # extension
|
|
308
|
+
|_Complex|_Imaginary # extension
|
|
309
|
+
)\b
|
|
310
|
+
""", re.VERBOSE)
|
|
311
|
+
|
|
312
|
+
_max_id = 4
|
|
313
|
+
_id_prefix = [None, '', '_CPPv2', '_CPPv3', '_CPPv4']
|
|
314
|
+
# Ids are used in lookup keys which are used across pickled files,
|
|
315
|
+
# so when _max_id changes, make sure to update the ENV_VERSION.
|
|
316
|
+
|
|
317
|
+
# ------------------------------------------------------------------------------
|
|
318
|
+
# Id v1 constants
|
|
319
|
+
# ------------------------------------------------------------------------------
|
|
320
|
+
|
|
321
|
+
_id_fundamental_v1 = {
|
|
322
|
+
'char': 'c',
|
|
323
|
+
'signed char': 'c',
|
|
324
|
+
'unsigned char': 'C',
|
|
325
|
+
'int': 'i',
|
|
326
|
+
'signed int': 'i',
|
|
327
|
+
'unsigned int': 'U',
|
|
328
|
+
'long': 'l',
|
|
329
|
+
'signed long': 'l',
|
|
330
|
+
'unsigned long': 'L',
|
|
331
|
+
'bool': 'b',
|
|
332
|
+
}
|
|
333
|
+
_id_shorthands_v1 = {
|
|
334
|
+
'std::string': 'ss',
|
|
335
|
+
'std::ostream': 'os',
|
|
336
|
+
'std::istream': 'is',
|
|
337
|
+
'std::iostream': 'ios',
|
|
338
|
+
'std::vector': 'v',
|
|
339
|
+
'std::map': 'm',
|
|
340
|
+
}
|
|
341
|
+
_id_operator_v1 = {
|
|
342
|
+
'new': 'new-operator',
|
|
343
|
+
'new[]': 'new-array-operator',
|
|
344
|
+
'delete': 'delete-operator',
|
|
345
|
+
'delete[]': 'delete-array-operator',
|
|
346
|
+
# the arguments will make the difference between unary and binary
|
|
347
|
+
# '+(unary)' : 'ps',
|
|
348
|
+
# '-(unary)' : 'ng',
|
|
349
|
+
# '&(unary)' : 'ad',
|
|
350
|
+
# '*(unary)' : 'de',
|
|
351
|
+
'~': 'inv-operator',
|
|
352
|
+
'+': 'add-operator',
|
|
353
|
+
'-': 'sub-operator',
|
|
354
|
+
'*': 'mul-operator',
|
|
355
|
+
'/': 'div-operator',
|
|
356
|
+
'%': 'mod-operator',
|
|
357
|
+
'&': 'and-operator',
|
|
358
|
+
'|': 'or-operator',
|
|
359
|
+
'^': 'xor-operator',
|
|
360
|
+
'=': 'assign-operator',
|
|
361
|
+
'+=': 'add-assign-operator',
|
|
362
|
+
'-=': 'sub-assign-operator',
|
|
363
|
+
'*=': 'mul-assign-operator',
|
|
364
|
+
'/=': 'div-assign-operator',
|
|
365
|
+
'%=': 'mod-assign-operator',
|
|
366
|
+
'&=': 'and-assign-operator',
|
|
367
|
+
'|=': 'or-assign-operator',
|
|
368
|
+
'^=': 'xor-assign-operator',
|
|
369
|
+
'<<': 'lshift-operator',
|
|
370
|
+
'>>': 'rshift-operator',
|
|
371
|
+
'<<=': 'lshift-assign-operator',
|
|
372
|
+
'>>=': 'rshift-assign-operator',
|
|
373
|
+
'==': 'eq-operator',
|
|
374
|
+
'!=': 'neq-operator',
|
|
375
|
+
'<': 'lt-operator',
|
|
376
|
+
'>': 'gt-operator',
|
|
377
|
+
'<=': 'lte-operator',
|
|
378
|
+
'>=': 'gte-operator',
|
|
379
|
+
'!': 'not-operator',
|
|
380
|
+
'&&': 'sand-operator',
|
|
381
|
+
'||': 'sor-operator',
|
|
382
|
+
'++': 'inc-operator',
|
|
383
|
+
'--': 'dec-operator',
|
|
384
|
+
',': 'comma-operator',
|
|
385
|
+
'->*': 'pointer-by-pointer-operator',
|
|
386
|
+
'->': 'pointer-operator',
|
|
387
|
+
'()': 'call-operator',
|
|
388
|
+
'[]': 'subscript-operator',
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
# ------------------------------------------------------------------------------
|
|
392
|
+
# Id v > 1 constants
|
|
393
|
+
# ------------------------------------------------------------------------------
|
|
394
|
+
|
|
395
|
+
_id_fundamental_v2 = {
|
|
396
|
+
# not all of these are actually parsed as fundamental types, TODO: do that
|
|
397
|
+
'void': 'v',
|
|
398
|
+
'bool': 'b',
|
|
399
|
+
'char': 'c',
|
|
400
|
+
'signed char': 'a',
|
|
401
|
+
'unsigned char': 'h',
|
|
402
|
+
'wchar_t': 'w',
|
|
403
|
+
'char32_t': 'Di',
|
|
404
|
+
'char16_t': 'Ds',
|
|
405
|
+
'char8_t': 'Du',
|
|
406
|
+
'short': 's',
|
|
407
|
+
'short int': 's',
|
|
408
|
+
'signed short': 's',
|
|
409
|
+
'signed short int': 's',
|
|
410
|
+
'unsigned short': 't',
|
|
411
|
+
'unsigned short int': 't',
|
|
412
|
+
'int': 'i',
|
|
413
|
+
'signed': 'i',
|
|
414
|
+
'signed int': 'i',
|
|
415
|
+
'unsigned': 'j',
|
|
416
|
+
'unsigned int': 'j',
|
|
417
|
+
'long': 'l',
|
|
418
|
+
'long int': 'l',
|
|
419
|
+
'signed long': 'l',
|
|
420
|
+
'signed long int': 'l',
|
|
421
|
+
'unsigned long': 'm',
|
|
422
|
+
'unsigned long int': 'm',
|
|
423
|
+
'long long': 'x',
|
|
424
|
+
'long long int': 'x',
|
|
425
|
+
'signed long long': 'x',
|
|
426
|
+
'signed long long int': 'x',
|
|
427
|
+
'__int64': 'x',
|
|
428
|
+
'unsigned long long': 'y',
|
|
429
|
+
'unsigned long long int': 'y',
|
|
430
|
+
'__int128': 'n',
|
|
431
|
+
'signed __int128': 'n',
|
|
432
|
+
'unsigned __int128': 'o',
|
|
433
|
+
'float': 'f',
|
|
434
|
+
'double': 'd',
|
|
435
|
+
'long double': 'e',
|
|
436
|
+
'__float80': 'e', '_Float64x': 'e',
|
|
437
|
+
'__float128': 'g', '_Float128': 'g',
|
|
438
|
+
'_Complex float': 'Cf',
|
|
439
|
+
'_Complex double': 'Cd',
|
|
440
|
+
'_Complex long double': 'Ce',
|
|
441
|
+
'_Imaginary float': 'f',
|
|
442
|
+
'_Imaginary double': 'd',
|
|
443
|
+
'_Imaginary long double': 'e',
|
|
444
|
+
'auto': 'Da',
|
|
445
|
+
'decltype(auto)': 'Dc',
|
|
446
|
+
'std::nullptr_t': 'Dn',
|
|
447
|
+
}
|
|
448
|
+
_id_operator_v2 = {
|
|
449
|
+
'new': 'nw',
|
|
450
|
+
'new[]': 'na',
|
|
451
|
+
'delete': 'dl',
|
|
452
|
+
'delete[]': 'da',
|
|
453
|
+
# the arguments will make the difference between unary and binary
|
|
454
|
+
# in operator definitions
|
|
455
|
+
# '+(unary)' : 'ps',
|
|
456
|
+
# '-(unary)' : 'ng',
|
|
457
|
+
# '&(unary)' : 'ad',
|
|
458
|
+
# '*(unary)' : 'de',
|
|
459
|
+
'~': 'co', 'compl': 'co',
|
|
460
|
+
'+': 'pl',
|
|
461
|
+
'-': 'mi',
|
|
462
|
+
'*': 'ml',
|
|
463
|
+
'/': 'dv',
|
|
464
|
+
'%': 'rm',
|
|
465
|
+
'&': 'an', 'bitand': 'an',
|
|
466
|
+
'|': 'or', 'bitor': 'or',
|
|
467
|
+
'^': 'eo', 'xor': 'eo',
|
|
468
|
+
'=': 'aS',
|
|
469
|
+
'+=': 'pL',
|
|
470
|
+
'-=': 'mI',
|
|
471
|
+
'*=': 'mL',
|
|
472
|
+
'/=': 'dV',
|
|
473
|
+
'%=': 'rM',
|
|
474
|
+
'&=': 'aN', 'and_eq': 'aN',
|
|
475
|
+
'|=': 'oR', 'or_eq': 'oR',
|
|
476
|
+
'^=': 'eO', 'xor_eq': 'eO',
|
|
477
|
+
'<<': 'ls',
|
|
478
|
+
'>>': 'rs',
|
|
479
|
+
'<<=': 'lS',
|
|
480
|
+
'>>=': 'rS',
|
|
481
|
+
'==': 'eq',
|
|
482
|
+
'!=': 'ne', 'not_eq': 'ne',
|
|
483
|
+
'<': 'lt',
|
|
484
|
+
'>': 'gt',
|
|
485
|
+
'<=': 'le',
|
|
486
|
+
'>=': 'ge',
|
|
487
|
+
'<=>': 'ss',
|
|
488
|
+
'!': 'nt', 'not': 'nt',
|
|
489
|
+
'&&': 'aa', 'and': 'aa',
|
|
490
|
+
'||': 'oo', 'or': 'oo',
|
|
491
|
+
'++': 'pp',
|
|
492
|
+
'--': 'mm',
|
|
493
|
+
',': 'cm',
|
|
494
|
+
'->*': 'pm',
|
|
495
|
+
'->': 'pt',
|
|
496
|
+
'()': 'cl',
|
|
497
|
+
'[]': 'ix',
|
|
498
|
+
'.*': 'ds', # this one is not overloadable, but we need it for expressions
|
|
499
|
+
'?': 'qu',
|
|
500
|
+
}
|
|
501
|
+
_id_operator_unary_v2 = {
|
|
502
|
+
'++': 'pp_',
|
|
503
|
+
'--': 'mm_',
|
|
504
|
+
'*': 'de',
|
|
505
|
+
'&': 'ad',
|
|
506
|
+
'+': 'ps',
|
|
507
|
+
'-': 'ng',
|
|
508
|
+
'!': 'nt', 'not': 'nt',
|
|
509
|
+
'~': 'co', 'compl': 'co',
|
|
510
|
+
}
|
|
511
|
+
_id_char_from_prefix: dict[str | None, str] = {
|
|
512
|
+
None: 'c', 'u8': 'c',
|
|
513
|
+
'u': 'Ds', 'U': 'Di', 'L': 'w',
|
|
514
|
+
}
|
|
515
|
+
# these are ordered by preceedence
|
|
516
|
+
_expression_bin_ops = [
|
|
517
|
+
['||', 'or'],
|
|
518
|
+
['&&', 'and'],
|
|
519
|
+
['|', 'bitor'],
|
|
520
|
+
['^', 'xor'],
|
|
521
|
+
['&', 'bitand'],
|
|
522
|
+
['==', '!=', 'not_eq'],
|
|
523
|
+
['<=>', '<=', '>=', '<', '>'],
|
|
524
|
+
['<<', '>>'],
|
|
525
|
+
['+', '-'],
|
|
526
|
+
['*', '/', '%'],
|
|
527
|
+
['.*', '->*'],
|
|
528
|
+
]
|
|
529
|
+
_expression_unary_ops = ["++", "--", "*", "&", "+", "-", "!", "not", "~", "compl"]
|
|
530
|
+
_expression_assignment_ops = ["=", "*=", "/=", "%=", "+=", "-=",
|
|
531
|
+
">>=", "<<=", "&=", "and_eq", "^=", "|=", "xor_eq", "or_eq"]
|
|
532
|
+
_id_explicit_cast = {
|
|
533
|
+
'dynamic_cast': 'dc',
|
|
534
|
+
'static_cast': 'sc',
|
|
535
|
+
'const_cast': 'cc',
|
|
536
|
+
'reinterpret_cast': 'rc',
|
|
537
|
+
}
|