[#100] uniform the handling of Annotations
Description
Make the rendering of a single Annotation unique (the most generic one, since it does not have the context to do more) and add AnnotationSet
to render correctly all the annotations associated to an entity.
This new datatype is now also used in all the places where the logic involving several annotations is present, for consistency.
In particular:
- a single
Annotation
is rendered even if empty (reason above and in docs) and this is also used forshow
- rendering of an
AnnotationSet
is also used forshow
as well as in un-typed instructions and types - pack uses this rendering to produce the annotation strings (with the same results as before)
- unpacking logic really is that of typechecking, which has been covered by #92 (closed)
-
OpSize
now performs the correct filtering of empty annotations, by usingAnnotationSet
- typed
Notes
are rendered/shown withAnnotationSet
s, but still with their constructors, as well as having better parenthesis.
Related issue(s)
Resolves #100 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Pinto Pasquale