[PATCH] D90540: [Syntax] Add minimal TableGen for syntax nodes. NFC

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 02:23:58 PST 2020


gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/include/clang/Tooling/Syntax/Syntax.td:9
+//
+// The C++ grammatical structure modeled by libSyntax is quite regular.
+//
----------------



================
Comment at: clang/include/clang/Tooling/Syntax/Syntax.td:20
+//    These are modeled as abstract types with inheritance (e.g. Declaration).
+//    In future, we may model some as variants to avoid multiple-inheritance.
+//
----------------
I'd suggest to add this point later if we decide to do it.


================
Comment at: clang/include/clang/Tooling/Syntax/Syntax.td:41
+
+// FIXME: add sequence, list, and alternative archetypes.
----------------
List is already defined in Nodes.td FWIW.


================
Comment at: clang/utils/TableGen/ClangSyntaxEmitter.cpp:19
+//
+// In future, the class definitions themselves will be moved produced by
+// additional backends.
----------------
I personally usually avoid writing about plans in comments, but up to you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90540



More information about the cfe-commits mailing list