Code

analyzer: Analyze expressions as well; validate typed expressions.
[sysdb.git] / src / core / store-private.h
index 3ae6c437d20f6b63a4376e610ac086bc576fd5f5..97e8a6c2fcce7fff076b2f0275ead0a2ae42306a 100644 (file)
@@ -126,6 +126,13 @@ struct sdb_store_expr {
 
        sdb_data_t data;
 };
+#define EXPR_TO_STRING(e) \
+       (((e)->type == TYPED_EXPR) ? "<typed>" \
+               : ((e)->type == ATTR_VALUE) ? "attribute" \
+               : ((e)->type == FIELD_VALUE) ? SDB_FIELD_TO_NAME((e)->data.data.integer) \
+               : ((e)->type == 0) ? "<constant>" \
+               : ((e)->type > 0) ? SDB_DATA_OP_TO_STRING((e)->type) \
+               : "<unknown>")
 
 /*
  * matchers