hokein added inline comments.

================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:87
+// Defines the built-in attribute keys.
+enum class AttributeKey : uint8_t {
+  // A guard controls whether a reduction of a rule will be conducted by the 
GLR
----------------
new names are welcome. Attribute is the name I came up with (I think it is 
clearer than the original `Hook`), 


================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:94
+// It is the index into a table of attribute values.
+// NOTE: value among attributes must be unique even within different keys!
+using AttributeID = uint16_t;
----------------
I'm not quite happy with using the value as the ID, I think we can encode the 
Key into the ID as well (ID := Key | Value). 

Similar to the generated enum name, currently we just use the name of Value 
(`Override`), it will be more confusing when we add more keys/values, one idea 
is to add key as well (`GuardOverride` etc?).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126536

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

Reply via email to