eduucaldas added inline comments.

================
Comment at: clang/include/clang/Tooling/Syntax/Tree.h:241-242
   /// "a; b; c"  <=> [("a" , ";"), ("b" , ";" ), ("c" , null)]
+  template <typename ElementType>
+  class ElementAndDelimiterIterator
+      : public llvm::iterator_facade_base<
----------------
Since we're gonna provide strongly-typed iterators, I make the Iterator a class 
template.

I keep the base functions as they were, `getElementAndDelimiterAfter...`, but I 
cast their result using `castToElementType`.

Another option would be to make the base functions also templated and not 
perform any casting.

We'll use `castToElementType` to provide the strongly-typed iterators as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88106/new/

https://reviews.llvm.org/D88106

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to