Add code to de-register patterns.

This commit is contained in:
2018-02-05 22:42:02 -08:00
parent 3b72569b33
commit 945426e245
2 changed files with 32 additions and 3 deletions

View File

@@ -114,6 +114,15 @@ liblex_result eval_config_free(eval_config* config);
* @return LIBLEX_SUCCESS if all goes well, or LIBLEX_MALLOC if there was an allocation failure.
*/
liblex_result eval_config_add(eval_config* config, const char* pattern, int pattern_id);
/**
* Removes a pattern from this configuration that has been previously
* registered.
* @param config the configuration to add the pattern to.
* @param pattern the pattern to remove.
* @param pattern_id the id associated with the pattern.
* @return LIBLEX_SUCCESS if all goes well, or LIBLEX_MALLOC if there was an allocation failure.
*/
liblex_result eval_config_remove(eval_config* config, const char* pattern, int pattern_id);
/**
* Evaluates / finds a single word.
* @param string the string to evaluate.