Virtlink / redgreen-aterms

An ATerms library that uses red-green trees.
4 stars 1 forks source link

Layout and trivia #7

Open Virtlink opened 7 years ago

Virtlink commented 7 years ago

Implement layout and trivia that can optionally be ignored in the red view of the green tree.

Note: Annotations will not contain trivia, or if they do, there is no special support for filtering them.

  • [ ] Add Trivia term type.
  • [ ] Add new property to red terms that shows the subterms including trivia.
  • [ ] Change getChildren of the red terms to only show the non-trivia terms.
  • [ ] Ensure the number of non-trivia terms matches the arity of the constructor.
  • [ ] Fix NameAgePair, it has to use dynamic indices (because there may be arbitrary trivia in the subterms).
  • [ ] Write example for traversing trivia.
  • [ ] Write example for inserting/removing trivia.
  • [ ] Write example to show how trivia helps reconstructing the original source.
  • [ ] Write test for children with trivia.