Skip to content

Commit 41fc594

Browse files
authored
make macro application annotations introspectable (#3450)
1 parent 8f2b7e9 commit 41fc594

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

working/macros/feature-specification.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,8 @@ others may only need the ability to emit that same code back into the program.
742742
#### The annotation introspection API
743743

744744
All declarations which can be annotated will have an
745-
`Iterable<MetadataAnnotation> get metadata` getter.
745+
`Iterable<MetadataAnnotation> get metadata` getter. This will contain all
746+
regular annotations as well as macro annotations.
746747

747748
All `MetadataAnnotation` objects have a `Code get code` getter, which gives
748749
access to the annotation as a `Code` object.
@@ -792,11 +793,11 @@ evaluation fails due to a violation of one of the restrictions above.
792793

793794
#### Are macro applications introspectable?
794795

795-
Macro applications share the same syntax as annotations, and users may expect
796-
macros to be able to see the other macros as a result.
796+
Macro application annotations are treated identically to regular annotations,
797+
and are introspectable in exactly the same ways.
797798

798-
For now we are choosing not to expose other macro applications as if they were
799-
metadata. While they do share a syntax they are conceptually different.
799+
The current macro application is also visible to itself in the list of metadata
800+
attached to the current declaration.
800801

801802
#### Modifying metadata annotations
802803

0 commit comments

Comments
 (0)