diff --git a/docs/codeql/ql-language-reference/annotations.rst b/docs/codeql/ql-language-reference/annotations.rst index 0ddb28c3a9d..00080087d36 100644 --- a/docs/codeql/ql-language-reference/annotations.rst +++ b/docs/codeql/ql-language-reference/annotations.rst @@ -16,9 +16,9 @@ For example, to declare a module ``M`` as private, you could use: } Note that some annotations act on an entity itself, whilst others act on a particular *name* for the entity: - - Act on an **entity**: ``abstract``, ``cached``, ``external``, ``transient``, ``override``, ``pragma``, ``language``, - and ``bindingset`` - - Act on a **name**: ``deprecated``, ``library``, ``private``, ``final``, and ``query`` + - Act on an **entity**: ``abstract``, ``bindingset``, ``cached``, ``external``, ``language``, + ``override``, ``pragma``, and ``transient`` + - Act on a **name**: ``deprecated``, ``final``, ``library``, ``private``, and ``query`` For example, if you annotate an entity with ``private``, then only that particular name is private. You could still access that entity under a different name (using an :ref:`alias `). diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index 9989c73e5dc..854c9f28f60 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -761,17 +761,17 @@ Various kinds of syntax can have *annotations* applied to them. Annotations are annotation ::= simpleAnnotation | argsAnnotation simpleAnnotation ::= "abstract" - | "cached" - | "external" - | "extensible" - | "final" - | "transient" - | "library" - | "private" - | "deprecated" - | "override" | "additional" + | "cached" + | "deprecated" + | "extensible" + | "external" + | "final" + | "library" + | "override" + | "private" | "query" + | "transient" argsAnnotation ::= "pragma" "[" ("inline" | "inline_late" | "noinline" | "nomagic" | "noopt" | "assume_small_delta") "]" | "language" "[" "monotonicAggregates" "]" @@ -791,28 +791,28 @@ The following table summarizes the syntactic constructs which can be marked with +================+=========+============+===================+=======================+=========+========+=========+=========+============+ | ``abstract`` | yes | | yes | | | | | | | +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ +| ``additional`` | yes | | | yes | | | yes | yes | yes | ++----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ | ``cached`` | yes | yes | yes | yes | | | yes | | | +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``external`` | | | | yes | | | | | | -+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``extensible`` | | | | yes | | | | | | -+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``final`` | yes | | yes | | | yes | | (yes) | | -+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``transient`` | | | | yes | | | | | | -+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``library`` | (yes) | | | | | | | | | -+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``private`` | yes | | yes | yes | yes | yes | yes | yes | yes | -+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ | ``deprecated`` | yes | | yes | yes | yes | yes | yes | yes | yes | +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ +| ``extensible`` | | | | yes | | | | | | ++----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ +| ``external`` | | | | yes | | | | | | ++----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ +| ``final`` | yes | | yes | | | yes | | (yes) | | ++----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ +| ``library`` | (yes) | | | | | | | | | ++----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ | ``override`` | | | yes | | | yes | | | | +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ -| ``additional`` | yes | | | yes | | | yes | yes | yes | +| ``private`` | yes | | yes | yes | yes | yes | yes | yes | yes | +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ | ``query`` | | | | yes | | | | yes | | +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ +| ``transient`` | | | | yes | | | | | | ++----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+ The ``library`` annotation is only usable within a QLL file, not a QL file. The ``final`` annotation is usable on type aliases, but not on module aliases and predicate aliases. @@ -2292,17 +2292,17 @@ The complete grammar for QL is as follows: annotation ::= simpleAnnotation | argsAnnotation simpleAnnotation ::= "abstract" - | "cached" - | "external" - | "extensible" - | "final" - | "transient" - | "library" - | "private" - | "deprecated" - | "override" | "additional" + | "cached" + | "deprecated" + | "extensible" + | "external" + | "final" + | "library" + | "override" + | "private" | "query" + | "transient" argsAnnotation ::= "pragma" "[" ("inline" | "inline_late" | "noinline" | "nomagic" | "noopt" | "assume_small_delta") "]" | "language" "[" "monotonicAggregates" "]"