Sphinx 7.2.5__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.

Files changed (388) hide show
  1. sphinx/__init__.py +8 -9
  2. sphinx/addnodes.py +31 -28
  3. sphinx/application.py +9 -15
  4. sphinx/builders/__init__.py +5 -6
  5. sphinx/builders/_epub_base.py +17 -9
  6. sphinx/builders/changes.py +10 -5
  7. sphinx/builders/dirhtml.py +4 -2
  8. sphinx/builders/dummy.py +3 -2
  9. sphinx/builders/epub3.py +5 -3
  10. sphinx/builders/gettext.py +24 -7
  11. sphinx/builders/html/__init__.py +88 -96
  12. sphinx/builders/html/_assets.py +16 -16
  13. sphinx/builders/html/transforms.py +4 -2
  14. sphinx/builders/latex/__init__.py +40 -33
  15. sphinx/builders/latex/nodes.py +6 -2
  16. sphinx/builders/latex/transforms.py +17 -8
  17. sphinx/builders/latex/util.py +1 -1
  18. sphinx/builders/linkcheck.py +86 -27
  19. sphinx/builders/manpage.py +8 -6
  20. sphinx/builders/singlehtml.py +5 -4
  21. sphinx/builders/texinfo.py +18 -14
  22. sphinx/builders/text.py +3 -2
  23. sphinx/builders/xml.py +5 -2
  24. sphinx/cmd/build.py +119 -76
  25. sphinx/cmd/make_mode.py +21 -20
  26. sphinx/cmd/quickstart.py +13 -16
  27. sphinx/config.py +432 -250
  28. sphinx/deprecation.py +23 -13
  29. sphinx/directives/__init__.py +8 -8
  30. sphinx/directives/code.py +7 -7
  31. sphinx/directives/other.py +23 -13
  32. sphinx/directives/patches.py +7 -6
  33. sphinx/domains/__init__.py +2 -2
  34. sphinx/domains/c/__init__.py +796 -0
  35. sphinx/domains/c/_ast.py +1421 -0
  36. sphinx/domains/c/_ids.py +65 -0
  37. sphinx/domains/c/_parser.py +1048 -0
  38. sphinx/domains/c/_symbol.py +700 -0
  39. sphinx/domains/changeset.py +11 -7
  40. sphinx/domains/citation.py +5 -2
  41. sphinx/domains/cpp/__init__.py +1089 -0
  42. sphinx/domains/cpp/_ast.py +3635 -0
  43. sphinx/domains/cpp/_ids.py +537 -0
  44. sphinx/domains/cpp/_parser.py +2117 -0
  45. sphinx/domains/cpp/_symbol.py +1092 -0
  46. sphinx/domains/index.py +6 -4
  47. sphinx/domains/javascript.py +16 -13
  48. sphinx/domains/math.py +9 -4
  49. sphinx/domains/python/__init__.py +890 -0
  50. sphinx/domains/python/_annotations.py +507 -0
  51. sphinx/domains/python/_object.py +426 -0
  52. sphinx/domains/rst.py +12 -7
  53. sphinx/domains/{std.py → std/__init__.py} +19 -16
  54. sphinx/environment/__init__.py +21 -19
  55. sphinx/environment/adapters/indexentries.py +2 -2
  56. sphinx/environment/adapters/toctree.py +10 -9
  57. sphinx/environment/collectors/__init__.py +6 -3
  58. sphinx/environment/collectors/asset.py +4 -3
  59. sphinx/environment/collectors/dependencies.py +3 -2
  60. sphinx/environment/collectors/metadata.py +6 -5
  61. sphinx/environment/collectors/title.py +3 -2
  62. sphinx/environment/collectors/toctree.py +5 -4
  63. sphinx/errors.py +13 -2
  64. sphinx/events.py +14 -9
  65. sphinx/ext/apidoc.py +9 -11
  66. sphinx/ext/autodoc/__init__.py +105 -71
  67. sphinx/ext/autodoc/directive.py +7 -6
  68. sphinx/ext/autodoc/importer.py +132 -52
  69. sphinx/ext/autodoc/mock.py +7 -5
  70. sphinx/ext/autodoc/preserve_defaults.py +4 -3
  71. sphinx/ext/autodoc/type_comment.py +2 -1
  72. sphinx/ext/autodoc/typehints.py +5 -4
  73. sphinx/ext/autosectionlabel.py +3 -2
  74. sphinx/ext/autosummary/__init__.py +21 -17
  75. sphinx/ext/autosummary/generate.py +9 -9
  76. sphinx/ext/coverage.py +26 -20
  77. sphinx/ext/doctest.py +38 -33
  78. sphinx/ext/duration.py +1 -0
  79. sphinx/ext/extlinks.py +4 -3
  80. sphinx/ext/githubpages.py +3 -2
  81. sphinx/ext/graphviz.py +10 -7
  82. sphinx/ext/ifconfig.py +5 -5
  83. sphinx/ext/imgconverter.py +6 -5
  84. sphinx/ext/imgmath.py +9 -8
  85. sphinx/ext/inheritance_diagram.py +31 -31
  86. sphinx/ext/intersphinx.py +140 -23
  87. sphinx/ext/linkcode.py +3 -2
  88. sphinx/ext/mathjax.py +2 -1
  89. sphinx/ext/napoleon/__init__.py +12 -7
  90. sphinx/ext/napoleon/docstring.py +34 -32
  91. sphinx/ext/todo.py +10 -7
  92. sphinx/ext/viewcode.py +12 -11
  93. sphinx/extension.py +18 -8
  94. sphinx/highlighting.py +39 -20
  95. sphinx/io.py +17 -8
  96. sphinx/jinja2glue.py +16 -15
  97. sphinx/locale/__init__.py +30 -23
  98. sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
  99. sphinx/locale/ar/LC_MESSAGES/sphinx.po +818 -761
  100. sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
  101. sphinx/locale/bg/LC_MESSAGES/sphinx.po +811 -754
  102. sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
  103. sphinx/locale/bn/LC_MESSAGES/sphinx.po +835 -778
  104. sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
  105. sphinx/locale/ca/LC_MESSAGES/sphinx.po +864 -807
  106. sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
  107. sphinx/locale/cak/LC_MESSAGES/sphinx.po +816 -759
  108. sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
  109. sphinx/locale/cs/LC_MESSAGES/sphinx.po +837 -780
  110. sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
  111. sphinx/locale/cy/LC_MESSAGES/sphinx.po +819 -762
  112. sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
  113. sphinx/locale/da/LC_MESSAGES/sphinx.po +838 -781
  114. sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
  115. sphinx/locale/de/LC_MESSAGES/sphinx.po +838 -781
  116. sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
  117. sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +811 -754
  118. sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
  119. sphinx/locale/el/LC_MESSAGES/sphinx.po +853 -796
  120. sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
  121. sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +811 -754
  122. sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
  123. sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +811 -754
  124. sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
  125. sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +856 -799
  126. sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
  127. sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +811 -754
  128. sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
  129. sphinx/locale/eo/LC_MESSAGES/sphinx.po +820 -763
  130. sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
  131. sphinx/locale/es/LC_MESSAGES/sphinx.po +856 -799
  132. sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
  133. sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +811 -754
  134. sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
  135. sphinx/locale/et/LC_MESSAGES/sphinx.po +845 -788
  136. sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
  137. sphinx/locale/eu/LC_MESSAGES/sphinx.po +837 -780
  138. sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
  139. sphinx/locale/fa/LC_MESSAGES/sphinx.po +854 -797
  140. sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
  141. sphinx/locale/fi/LC_MESSAGES/sphinx.po +816 -759
  142. sphinx/locale/fr/LC_MESSAGES/sphinx.js +1 -1
  143. sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
  144. sphinx/locale/fr/LC_MESSAGES/sphinx.po +904 -847
  145. sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
  146. sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +811 -754
  147. sphinx/locale/gl/LC_MESSAGES/sphinx.js +54 -54
  148. sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
  149. sphinx/locale/gl/LC_MESSAGES/sphinx.po +1506 -1449
  150. sphinx/locale/he/LC_MESSAGES/sphinx.js +1 -1
  151. sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
  152. sphinx/locale/he/LC_MESSAGES/sphinx.po +823 -766
  153. sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
  154. sphinx/locale/hi/LC_MESSAGES/sphinx.po +853 -796
  155. sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
  156. sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +811 -754
  157. sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
  158. sphinx/locale/hr/LC_MESSAGES/sphinx.po +844 -787
  159. sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
  160. sphinx/locale/hu/LC_MESSAGES/sphinx.po +837 -780
  161. sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
  162. sphinx/locale/id/LC_MESSAGES/sphinx.po +854 -797
  163. sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
  164. sphinx/locale/is/LC_MESSAGES/sphinx.po +811 -754
  165. sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
  166. sphinx/locale/it/LC_MESSAGES/sphinx.po +837 -780
  167. sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
  168. sphinx/locale/ja/LC_MESSAGES/sphinx.po +853 -796
  169. sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
  170. sphinx/locale/ka/LC_MESSAGES/sphinx.po +848 -791
  171. sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
  172. sphinx/locale/ko/LC_MESSAGES/sphinx.po +855 -798
  173. sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
  174. sphinx/locale/lt/LC_MESSAGES/sphinx.po +837 -780
  175. sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
  176. sphinx/locale/lv/LC_MESSAGES/sphinx.po +837 -780
  177. sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
  178. sphinx/locale/mk/LC_MESSAGES/sphinx.po +825 -768
  179. sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js +27 -27
  180. sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
  181. sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +876 -818
  182. sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
  183. sphinx/locale/ne/LC_MESSAGES/sphinx.po +837 -780
  184. sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
  185. sphinx/locale/nl/LC_MESSAGES/sphinx.po +844 -787
  186. sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
  187. sphinx/locale/pl/LC_MESSAGES/sphinx.po +845 -788
  188. sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
  189. sphinx/locale/pt/LC_MESSAGES/sphinx.po +811 -754
  190. sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
  191. sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +908 -851
  192. sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
  193. sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +837 -780
  194. sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
  195. sphinx/locale/ro/LC_MESSAGES/sphinx.po +837 -780
  196. sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
  197. sphinx/locale/ru/LC_MESSAGES/sphinx.po +838 -781
  198. sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
  199. sphinx/locale/si/LC_MESSAGES/sphinx.po +823 -766
  200. sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
  201. sphinx/locale/sk/LC_MESSAGES/sphinx.po +854 -797
  202. sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
  203. sphinx/locale/sl/LC_MESSAGES/sphinx.po +832 -775
  204. sphinx/locale/sphinx.pot +813 -755
  205. sphinx/locale/sq/LC_MESSAGES/sphinx.js +1 -1
  206. sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
  207. sphinx/locale/sq/LC_MESSAGES/sphinx.po +865 -808
  208. sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
  209. sphinx/locale/sr/LC_MESSAGES/sphinx.po +835 -778
  210. sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo +0 -0
  211. sphinx/locale/sr_RS/LC_MESSAGES/sphinx.mo +0 -0
  212. sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
  213. sphinx/locale/sv/LC_MESSAGES/sphinx.po +837 -780
  214. sphinx/locale/ta/LC_MESSAGES/sphinx.js +54 -54
  215. sphinx/locale/ta/LC_MESSAGES/sphinx.mo +0 -0
  216. sphinx/locale/ta/LC_MESSAGES/sphinx.po +1530 -1473
  217. sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
  218. sphinx/locale/te/LC_MESSAGES/sphinx.po +811 -754
  219. sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
  220. sphinx/locale/tr/LC_MESSAGES/sphinx.po +853 -796
  221. sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
  222. sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +833 -776
  223. sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
  224. sphinx/locale/ur/LC_MESSAGES/sphinx.po +811 -754
  225. sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
  226. sphinx/locale/vi/LC_MESSAGES/sphinx.po +837 -780
  227. sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
  228. sphinx/locale/yue/LC_MESSAGES/sphinx.po +811 -754
  229. sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo +0 -0
  230. sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +855 -798
  231. sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
  232. sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +811 -754
  233. sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js +1 -1
  234. sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
  235. sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +879 -822
  236. sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
  237. sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +811 -754
  238. sphinx/parsers.py +7 -5
  239. sphinx/project.py +18 -11
  240. sphinx/pycode/__init__.py +6 -5
  241. sphinx/pycode/ast.py +23 -8
  242. sphinx/pycode/parser.py +6 -5
  243. sphinx/registry.py +12 -6
  244. sphinx/roles.py +103 -57
  245. sphinx/search/__init__.py +17 -18
  246. sphinx/search/da.py +2 -2
  247. sphinx/search/de.py +2 -2
  248. sphinx/search/en.py +1 -1
  249. sphinx/search/es.py +2 -2
  250. sphinx/search/fi.py +2 -2
  251. sphinx/search/fr.py +2 -2
  252. sphinx/search/hu.py +2 -2
  253. sphinx/search/it.py +2 -2
  254. sphinx/search/ja.py +13 -22
  255. sphinx/search/nl.py +2 -2
  256. sphinx/search/no.py +2 -2
  257. sphinx/search/pt.py +2 -2
  258. sphinx/search/ro.py +1 -1
  259. sphinx/search/ru.py +2 -2
  260. sphinx/search/sv.py +2 -2
  261. sphinx/search/tr.py +1 -1
  262. sphinx/search/zh.py +2 -3
  263. sphinx/templates/graphviz/graphviz.css +1 -1
  264. sphinx/testing/fixtures.py +41 -24
  265. sphinx/testing/path.py +1 -1
  266. sphinx/testing/util.py +142 -53
  267. sphinx/texinputs/sphinx.xdy +1 -1
  268. sphinx/texinputs/sphinxlatextables.sty +1 -1
  269. sphinx/texinputs/sphinxpackagesubstitutefont.sty +21 -0
  270. sphinx/themes/agogo/layout.html +4 -4
  271. sphinx/themes/agogo/static/agogo.css_t +1 -1
  272. sphinx/themes/agogo/theme.toml +22 -0
  273. sphinx/themes/basic/defindex.html +1 -1
  274. sphinx/themes/basic/domainindex.html +1 -1
  275. sphinx/themes/basic/genindex-single.html +1 -1
  276. sphinx/themes/basic/genindex-split.html +1 -1
  277. sphinx/themes/basic/genindex.html +1 -1
  278. sphinx/themes/basic/globaltoc.html +1 -1
  279. sphinx/themes/basic/layout.html +1 -1
  280. sphinx/themes/basic/localtoc.html +1 -1
  281. sphinx/themes/basic/page.html +1 -1
  282. sphinx/themes/basic/relations.html +1 -1
  283. sphinx/themes/basic/search.html +5 -20
  284. sphinx/themes/basic/searchbox.html +3 -3
  285. sphinx/themes/basic/searchfield.html +3 -3
  286. sphinx/themes/basic/sourcelink.html +1 -1
  287. sphinx/themes/basic/static/basic.css_t +1 -1
  288. sphinx/themes/basic/static/doctools.js +1 -1
  289. sphinx/themes/basic/static/language_data.js_t +2 -2
  290. sphinx/themes/basic/static/searchtools.js +105 -60
  291. sphinx/themes/basic/theme.toml +23 -0
  292. sphinx/themes/bizstyle/layout.html +1 -6
  293. sphinx/themes/bizstyle/static/bizstyle.css_t +1 -1
  294. sphinx/themes/bizstyle/static/bizstyle.js_t +1 -1
  295. sphinx/themes/bizstyle/static/css3-mediaqueries_src.js +3 -3
  296. sphinx/themes/bizstyle/theme.toml +12 -0
  297. sphinx/themes/classic/layout.html +1 -1
  298. sphinx/themes/classic/static/classic.css_t +1 -1
  299. sphinx/themes/classic/static/sidebar.js_t +1 -1
  300. sphinx/themes/classic/theme.toml +34 -0
  301. sphinx/themes/default/theme.toml +2 -0
  302. sphinx/themes/epub/epub-cover.html +1 -1
  303. sphinx/themes/epub/layout.html +1 -1
  304. sphinx/themes/epub/static/epub.css_t +1 -1
  305. sphinx/themes/epub/theme.toml +10 -0
  306. sphinx/themes/haiku/layout.html +3 -3
  307. sphinx/themes/haiku/static/haiku.css_t +2 -2
  308. sphinx/themes/haiku/theme.toml +16 -0
  309. sphinx/themes/nature/static/nature.css_t +1 -1
  310. sphinx/themes/nature/theme.toml +6 -0
  311. sphinx/themes/nonav/layout.html +1 -1
  312. sphinx/themes/nonav/static/nonav.css_t +1 -1
  313. sphinx/themes/nonav/theme.toml +10 -0
  314. sphinx/themes/pyramid/static/epub.css_t +1 -1
  315. sphinx/themes/pyramid/static/pyramid.css_t +1 -1
  316. sphinx/themes/pyramid/theme.toml +6 -0
  317. sphinx/themes/scrolls/artwork/logo.svg +1 -1
  318. sphinx/themes/scrolls/layout.html +2 -2
  319. sphinx/themes/scrolls/static/scrolls.css_t +1 -1
  320. sphinx/themes/scrolls/theme.toml +15 -0
  321. sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +1 -1
  322. sphinx/themes/sphinxdoc/theme.toml +6 -0
  323. sphinx/themes/traditional/static/traditional.css_t +1 -1
  324. sphinx/themes/traditional/theme.toml +9 -0
  325. sphinx/theming.py +427 -131
  326. sphinx/transforms/__init__.py +21 -24
  327. sphinx/transforms/compact_bullet_list.py +5 -5
  328. sphinx/transforms/i18n.py +30 -28
  329. sphinx/transforms/post_transforms/__init__.py +9 -7
  330. sphinx/transforms/post_transforms/code.py +4 -1
  331. sphinx/transforms/post_transforms/images.py +17 -13
  332. sphinx/transforms/references.py +3 -1
  333. sphinx/util/__init__.py +15 -11
  334. sphinx/util/_io.py +34 -0
  335. sphinx/util/_pathlib.py +23 -18
  336. sphinx/util/build_phase.py +1 -0
  337. sphinx/util/cfamily.py +19 -11
  338. sphinx/util/console.py +101 -21
  339. sphinx/util/display.py +3 -2
  340. sphinx/util/docfields.py +12 -8
  341. sphinx/util/docutils.py +21 -35
  342. sphinx/util/exceptions.py +3 -2
  343. sphinx/util/fileutil.py +5 -5
  344. sphinx/util/http_date.py +9 -2
  345. sphinx/util/i18n.py +40 -9
  346. sphinx/util/inspect.py +317 -245
  347. sphinx/util/inventory.py +22 -5
  348. sphinx/util/logging.py +81 -7
  349. sphinx/util/matching.py +2 -1
  350. sphinx/util/math.py +1 -2
  351. sphinx/util/nodes.py +39 -29
  352. sphinx/util/osutil.py +25 -6
  353. sphinx/util/parallel.py +6 -1
  354. sphinx/util/requests.py +8 -5
  355. sphinx/util/rst.py +8 -6
  356. sphinx/util/tags.py +3 -3
  357. sphinx/util/template.py +8 -3
  358. sphinx/util/typing.py +76 -42
  359. sphinx/versioning.py +6 -2
  360. sphinx/writers/html.py +1 -1
  361. sphinx/writers/html5.py +17 -13
  362. sphinx/writers/latex.py +12 -12
  363. sphinx/writers/manpage.py +13 -7
  364. sphinx/writers/texinfo.py +13 -10
  365. sphinx/writers/text.py +13 -23
  366. sphinx/writers/xml.py +1 -1
  367. sphinx-7.2.5.dist-info/LICENSE → sphinx-7.3.0.dist-info/LICENSE.rst +1 -1
  368. {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/METADATA +13 -12
  369. sphinx-7.3.0.dist-info/RECORD +581 -0
  370. sphinx/domains/c.py +0 -3906
  371. sphinx/domains/cpp.py +0 -8233
  372. sphinx/domains/python.py +0 -1769
  373. sphinx/themes/agogo/theme.conf +0 -20
  374. sphinx/themes/basic/theme.conf +0 -16
  375. sphinx/themes/bizstyle/theme.conf +0 -10
  376. sphinx/themes/classic/theme.conf +0 -32
  377. sphinx/themes/default/theme.conf +0 -2
  378. sphinx/themes/epub/theme.conf +0 -8
  379. sphinx/themes/haiku/theme.conf +0 -14
  380. sphinx/themes/nature/theme.conf +0 -4
  381. sphinx/themes/nonav/theme.conf +0 -8
  382. sphinx/themes/pyramid/theme.conf +0 -4
  383. sphinx/themes/scrolls/theme.conf +0 -13
  384. sphinx/themes/sphinxdoc/theme.conf +0 -4
  385. sphinx/themes/traditional/theme.conf +0 -7
  386. sphinx-7.2.5.dist-info/RECORD +0 -569
  387. {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/WHEEL +0 -0
  388. {sphinx-7.2.5.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
+ }