Still doesn't build, but desugaring is farther along
This commit is contained in:
parent
36e1f66de0
commit
156be7a559
16 changed files with 266 additions and 26 deletions
|
|
@ -12,10 +12,19 @@ static HParseResult* parse_ch(void* env, HParseState *state) {
|
|||
}
|
||||
}
|
||||
|
||||
static HCFChoice* desugar_ch(HAllocator *mm__, void *env) {
|
||||
HCFChoice *ret = h_new(HCFChoice, 1);
|
||||
ret->type = HCF_CHAR;
|
||||
ret->chr = (uint8_t)(unsigned long)(env);
|
||||
ret->action = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const HParserVtable ch_vt = {
|
||||
.parse = parse_ch,
|
||||
.isValidRegular = h_true,
|
||||
.isValidCF = h_true,
|
||||
.desugar = desugar_ch,
|
||||
};
|
||||
|
||||
const HParser* h_ch(const uint8_t c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue