aboutsummaryrefslogtreecommitdiff
path: root/doc/sphinx/language/core/basic.rst
diff options
context:
space:
mode:
authorThéo Zimmermann2020-11-14 18:44:57 +0100
committerEmilio Jesus Gallego Arias2020-11-18 16:25:00 +0100
commitca42305f1ed1699065cffdef7d96bf5fcc0069be (patch)
treeb72fb82071db98d6ab2c1b52f22e57e1c1befc9f /doc/sphinx/language/core/basic.rst
parent3b479357d8c5c1a655b2b8257f14a8cafe7621fc (diff)
Review commit: improving the doc of boolean attributes.
Diffstat (limited to 'doc/sphinx/language/core/basic.rst')
-rw-r--r--doc/sphinx/language/core/basic.rst26
1 files changed, 12 insertions, 14 deletions
diff --git a/doc/sphinx/language/core/basic.rst b/doc/sphinx/language/core/basic.rst
index ea29da6dd4..2b262b89c0 100644
--- a/doc/sphinx/language/core/basic.rst
+++ b/doc/sphinx/language/core/basic.rst
@@ -380,24 +380,22 @@ this attribute`.
The order of top-level attributes doesn't affect their meaning. ``#[foo,bar]``, ``#[bar,foo]``,
``#[foo]#[bar]`` and ``#[bar]#[foo]`` are equivalent.
-Boolean attributes take the form ``attr={yes,no}``, when the key is
-omitted the default is assumed to be ``yes``.
+:gdef:`Boolean attributes <boolean attribute>` take the form :n:`@ident__attr{? = {| yes | no } }`.
+When the :n:`{| yes | no }` value is omitted, the default is :n:`yes`.
The legacy attributes (:n:`@legacy_attr`) provide an older, alternate syntax
for certain attributes. They are equivalent to new attributes as follows:
-================ ================================
-Legacy attribute New attribute
-================ ================================
-`Local` :attr:`local`
-`Global` :attr:`global`
-`Polymorphic` :attr:`universes(polymorphic)`
-`Monomorphic` :attr:`universes(polymorphic)`
-`Cumulative` :attr:`universes(cumulative)`
-`NonCumulative` :attr:`universes(cumulative)`
-`Private` :attr:`private(matching)`
-`Program` :attr:`program`
-================ ================================
+============================= ================================
+Legacy attribute New attribute
+============================= ================================
+`Local` :attr:`local`
+`Global` :attr:`global`
+`Polymorphic`, `Monomorphic` :attr:`universes(polymorphic)`
+`Cumulative`, `NonCumulative` :attr:`universes(cumulative)`
+`Private` :attr:`private(matching)`
+`Program` :attr:`program`
+============================= ================================
Attributes appear in the HTML documentation in blue or gray boxes
after the label "Attribute". In the pdf, they appear after the