Store information about tokens when they are added.

This commit is contained in:
2018-02-05 22:09:12 -08:00
parent bb07382b59
commit 3b72569b33
2 changed files with 35 additions and 9 deletions

View File

@@ -74,9 +74,26 @@ struct eval_config_s {
ll states;
};
/**
* Information about a state that has been
* added with eval_config_add.
*/
struct eval_state_s {
/**
* The string that was used to compile
* this state.
*/
const char* source;
/**
* The pattern that was generated with this state.
*/
pattern* pattern;
};
typedef struct match_s match;
typedef struct eval_s eval;
typedef struct eval_config_s eval_config;
typedef struct eval_state_s eval_state;
/**
* Initializes the evaluation configuration.