add create_delimiters_tab/free_delimiters_tab in class token_tree.

This commit is contained in:
zsxxsz 2018-08-19 22:36:18 +08:00
parent 03480089bc
commit 001dd3f0eb
2 changed files with 25 additions and 1 deletions

View File

@ -103,7 +103,8 @@ public:
* @param delimiters {const char*} NULL
*
* @param delimiters_tab {const char*} NULL
*
*
* create_delimiters_tab free_delimiters_tab
* @return {token_node*} NULL
* *text '\0'
* delimiters 使 delimiters
@ -112,6 +113,19 @@ public:
const token_node* match(const char** text, const char* delimiters = NULL,
const char* delimiters_tab = NULL);
/**
*
* @param delimiters {const char*}
* @return {char*}
*/
static char* create_delimiters_tab(const char* delimiters);
/**
* create_delimiters_tab
* @param delimiters_tab {char*}
*/
static void free_delimiters_tab(char* delimiters_tab);
/**
* 256
* @return {token_node*}

View File

@ -82,6 +82,16 @@ const token_node* token_tree::match(const char** text, const char* delimiters,
return &node_;
}
char* token_tree::create_delimiters_tab(const char* delimiters)
{
return acl_token_delim_tab_new(delimiters);
}
void token_tree::free_delimiters_tab(char* delimiters_tab)
{
acl_token_delim_tab_free(delimiters_tab);
}
const token_node* token_tree::first_node(void)
{
if (iter_ == NULL) {