Add ERRORK opcode to trigger constant errors
This commit is contained in:
1 parent
71941a0d47
commit
5fc5453409
4 files changed
+16
No files matched your search
@@ -405,6 +405,12 @@ jv jq_next(jq_state *jq) {
|
||||
|
||||
case TOP: break;
|
||||
|
||||
case ERRORK: {
|
||||
jv v = jv_array_get(jv_copy(frame_current(jq)->bc->constants), *pc++);
|
||||
set_error(jq, jv_invalid_with_msg(v));
|
||||
goto do_backtrack;
|
||||
}
|
||||
|
||||
case LOADK: {
|
||||
jv v = jv_array_get(jv_copy(frame_current(jq)->bc->constants), *pc++);
|
||||
assert(jv_is_valid(v));
|
||||
|
||||
Reference in new issue
Block a user