rvm instructions for ch(); fixed a declaration in optional()
This commit is contained in:
parent
8a5c4b6b67
commit
875c9b9c57
2 changed files with 12 additions and 3 deletions
|
|
@ -21,9 +21,10 @@ static bool opt_isValidCF(void *env) {
|
|||
return p->vtable->isValidCF(p->env);
|
||||
}
|
||||
|
||||
static bool opt_ctrvm(struct HRVMProg_ *prog, void* env) {
|
||||
static bool opt_ctrvm(HRVMProg *prog, void* env) {
|
||||
uint16_t insn = h_rvm_insert_insn(prog, RVM_FORK, 0);
|
||||
if (!h_compile_regex(prog, (HParser*)env->env))
|
||||
HParser *p = (HParser*) env;
|
||||
if (!h_compile_regex(prog, p->env))
|
||||
return false;
|
||||
h_rvm_patch_arg(prog, insn, h_rvm_get_ip(prog));
|
||||
return true;
|
||||
|
|
@ -33,7 +34,7 @@ static const HParserVtable optional_vt = {
|
|||
.parse = parse_optional,
|
||||
.isValidRegular = opt_isValidRegular,
|
||||
.isValidCF = opt_isValidCF,
|
||||
.compile_to_rvm = opt_ctvrm,
|
||||
.compile_to_rvm = opt_ctrvm,
|
||||
};
|
||||
|
||||
const HParser* h_optional(const HParser* p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue