Skip to content

[#100] uniform the handling of Annotations

Pinto Pasquale requested to merge pasqu4le/#100-consistent-notes-handling into master

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 for show
  • rendering of an AnnotationSet is also used for show 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 using AnnotationSet
  • typed Notes are rendered/shown with AnnotationSets, 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

    • I checked whether I should update the docs and did so if necessary:
    • I updated the changelog if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Pinto Pasquale

Merge request reports