@@ -704,12 +704,14 @@ Various kinds of syntax can have *annotations* applied to them. Annotations are
704
704
simpleAnnotation ::= "abstract"
705
705
| "cached"
706
706
| "external"
707
+ | "extensible"
707
708
| "final"
708
709
| "transient"
709
710
| "library"
710
711
| "private"
711
712
| "deprecated"
712
713
| "override"
714
+ | "additional"
713
715
| "query"
714
716
715
717
argsAnnotation ::= "pragma" "[" ("inline" | "inline_late" | "noinline" | "nomagic" | "noopt" | "assume_small_delta") "]"
@@ -725,31 +727,36 @@ Simple annotations
725
727
726
728
The following table summarizes the syntactic constructs which can be marked with each annotation in a valid program; for example, an ``abstract `` annotation preceding a character is invalid.
727
729
728
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
729
- | Annotation | Classes | Characters | Member predicates | Non-member predicates | Imports | Fields | Modules | Aliases |
730
- +================+=========+============+===================+=======================+=========+========+=========+=========+
731
- | ``abstract `` | yes | | yes | | | | | |
732
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
733
- | ``cached `` | yes | yes | yes | yes | | | yes | |
734
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
735
- | ``external `` | | | | yes | | | | |
736
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
737
- | ``final `` | yes | | yes | | | yes | | yes |
738
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
739
- | ``transient `` | | | | yes | | | | |
740
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
741
- | ``library `` | yes | | | | | | | |
742
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
743
- | ``private `` | yes | | yes | yes | yes | yes | yes | yes |
744
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
745
- | ``deprecated `` | yes | | yes | yes | | yes | yes | yes |
746
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
747
- | ``override `` | | | yes | | | yes | | |
748
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
749
- | ``query `` | | | | yes | | | | yes |
750
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
730
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
731
+ | Annotation | Classes | Characters | Member predicates | Non-member predicates | Imports | Fields | Modules | Aliases | Signatures |
732
+ +================+=========+============+===================+=======================+=========+========+=========+=========+============+
733
+ | ``abstract `` | yes | | yes | | | | | | |
734
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
735
+ | ``cached `` | yes | yes | yes | yes | | | yes | | |
736
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
737
+ | ``external `` | | | | yes | | | | | |
738
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
739
+ | ``extensible `` | | | | yes | | | | | |
740
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
741
+ | ``final `` | yes | | yes | | | yes | | (yes) | |
742
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
743
+ | ``transient `` | | | | yes | | | | | |
744
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
745
+ | ``library `` | (yes) | | | | | | | | |
746
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
747
+ | ``private `` | yes | | yes | yes | yes | yes | yes | yes | yes |
748
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
749
+ | ``deprecated `` | yes | | yes | yes | | yes | yes | yes | yes |
750
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
751
+ | ``override `` | | | yes | | | yes | | | |
752
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
753
+ | ``additional `` | yes | | | yes | | | yes | yes | yes |
754
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
755
+ | ``query `` | | | | yes | | | | yes | |
756
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
751
757
752
758
The ``library `` annotation is only usable within a QLL file, not a QL file.
759
+ The ``final `` annotation is usable on type aliases, but not on module aliases and predicate aliases.
753
760
754
761
Annotations on aliases apply to the name introduced by the alias. An alias may, for example, have different privacy to the name it aliases.
755
762
@@ -799,11 +806,13 @@ Binding sets are checked by the QL compiler in the following way:
799
806
800
807
A predicate may have several different binding sets, which can be stated by using multiple ``bindingset `` annotations on the same predicate.
801
808
802
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
803
- | Pragma | Classes | Characters | Member predicates | Non-member predicates | Imports | Fields | Modules | Aliases |
804
- +================+=========+============+===================+=======================+=========+========+=========+=========+
805
- | ``bindingset `` | | yes | yes | yes | | | | |
806
- +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
809
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
810
+ | Pragma | Classes | Characters | Member predicates | Non-member predicates | Imports | Fields | Modules | Aliases | Signatures |
811
+ +================+=========+============+===================+=======================+=========+========+=========+=========+============+
812
+ | ``bindingset `` | | yes | yes | yes | | | | | (yes) |
813
+ +----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+------------+
814
+
815
+ The ``bindingset `` pragma is usable with type signatures and predicate signatures, but not with module signatures.
807
816
808
817
QLDoc
809
818
-----
@@ -2159,12 +2168,14 @@ The complete grammar for QL is as follows:
2159
2168
simpleAnnotation ::= "abstract"
2160
2169
| "cached"
2161
2170
| "external"
2171
+ | "extensible"
2162
2172
| "final"
2163
2173
| "transient"
2164
2174
| "library"
2165
2175
| "private"
2166
2176
| "deprecated"
2167
2177
| "override"
2178
+ | "additional"
2168
2179
| "query"
2169
2180
2170
2181
argsAnnotation ::= "pragma" "[" ("inline" | "inline_late" | "noinline" | "nomagic" | "noopt" | "assume_small_delta") "]"
0 commit comments