diff options
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/variables.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mds-kbdc/variables.h b/src/mds-kbdc/variables.h index c01c163..c678c59 100644 --- a/src/mds-kbdc/variables.h +++ b/src/mds-kbdc/variables.h @@ -74,6 +74,21 @@ int variables_let(size_t variable, mds_kbdc_tree_t* restrict value); */ mds_kbdc_tree_t* variables_get(size_t variable) __attribute__((pure)); +/** + * Mark a variable as having been unsed in a for-loop in the current scope + * + * @param variable The variable index, must already be defined + * @return Zero on success, -1 on error + */ +int variables_was_used_in_for(size_t variable); + +/** + * Check whether a variable has been used in a for-loop in the current scope + * + * @param variable The variable index, must already be defined + * @return Whether `variables_was_used_in_for` has been unused on the variable + */ +int variables_has_been_used_in_for(size_t variable) __attribute__((pure)); #endif |