Add an ability to attach comment to check-state rules.
MFC after: 1 week
This commit is contained in:
parent
de0a5f6a76
commit
fe7e60ec8a
@ -4120,8 +4120,17 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
|
||||
cmd = next_cmd(cmd, &cblen);
|
||||
}
|
||||
|
||||
if (have_state) /* must be a check-state, we are done */
|
||||
if (have_state) { /* must be a check-state, we are done */
|
||||
if (*av != NULL &&
|
||||
match_token(rule_options, *av) == TOK_COMMENT) {
|
||||
/* check-state has a comment */
|
||||
av++;
|
||||
fill_comment(cmd, av, cblen);
|
||||
cmd = next_cmd(cmd, &cblen);
|
||||
av[0] = NULL;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
#define OR_START(target) \
|
||||
if (av[0] && (*av[0] == '(' || *av[0] == '{')) { \
|
||||
|
Loading…
Reference in New Issue
Block a user