Still doesn't build, but desugaring is farther along

This commit is contained in:
Meredith L. Patterson 2013-02-02 19:31:18 -05:00
parent 36e1f66de0
commit 156be7a559
16 changed files with 266 additions and 26 deletions

View file

@ -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) {