Expanded vtable for methods to determine whether a combinator is ok to use with regular or CF grammars.
This commit is contained in:
parent
8163b3981d
commit
36e1f66de0
25 changed files with 200 additions and 4 deletions
|
|
@ -14,8 +14,20 @@ static HParseResult* parse_whitespace(void* env, HParseState *state) {
|
|||
return h_do_parse((HParser*)env, state);
|
||||
}
|
||||
|
||||
static bool ws_isValidRegular(void *env) {
|
||||
HParser *p = (HParser*)env;
|
||||
return p->vtable->isValidRegular(p->env);
|
||||
}
|
||||
|
||||
static bool ws_isValidCF(void *env) {
|
||||
HParser *p = (HParser*)env;
|
||||
return p->vtable->isValidCF(p->env);
|
||||
}
|
||||
|
||||
static const HParserVtable whitespace_vt = {
|
||||
.parse = parse_whitespace,
|
||||
.isValidRegular = ws_isValidRegular,
|
||||
.isValidCF = ws_isValidCF,
|
||||
};
|
||||
|
||||
const HParser* h_whitespace(const HParser* p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue