]> git.saurik.com Git - bison.git/blobdiff - src/scan-code.h
parser: factor handling of type tags
[bison.git] / src / scan-code.h
index 3fa5ea9a00d4796386a3df661afc895078018c7f..2dfb1704adb0386cfa0b0c932de1ea5099f14c63 100644 (file)
@@ -69,6 +69,10 @@ typedef struct code_props {
    */
   bool is_predicate;
 
+  /**
+   * Whether this is actually used (i.e., not completely masked by
+   * other code props).  */
+  bool is_used;
 
   /** \c NULL iff \c code_props::kind is not \c CODE_PROPS_RULE_ACTION.  */
   struct symbol_list *rule;
@@ -86,11 +90,20 @@ typedef struct code_props {
 void code_props_none_init (code_props *self);
 
 /** Equivalent to \c code_props_none_init.  */
-#define CODE_PROPS_NONE_INIT \
-  {CODE_PROPS_NONE, NULL, EMPTY_LOCATION_INIT, false, false, NULL, NULL}
+#define CODE_PROPS_NONE_INIT                    \
+  {                                             \
+    /* .kind = */ CODE_PROPS_NONE,              \
+    /* .code = */ NULL,                         \
+    /* .location = */ EMPTY_LOCATION_INIT,      \
+    /* .is_value_used = */ false,               \
+    /* .is_predicate = */ false,                \
+    /* .is_used = */ false,                     \
+    /* .rule = */ NULL,                         \
+    /* .named_ref = */ NULL                     \
+  }
 
 /** Initialized by \c CODE_PROPS_NONE_INIT with no further modification.  */
-extern code_props const code_props_none;
+extern code_props code_props_none;
 
 /**
  * \pre