Fix foreach non-progation of errors

Errors were being re-propagated as "break".

Also add `error/0` builtin, which made this fix easier.
This commit is contained in:
Nicolas Williams committed 2014-12-26 23:05:20 -06:00
1 parent 46e3125e26
commit e51e916e31
2 files changed
+16 -6

No files matched your search

+1
View File
@@ -959,6 +959,7 @@ static block bind_bytecoded_builtins(block b) {
#define LIBM_DD(name) "def " #name ": _" #name ";",
static const char* const jq_builtins[] = {
"def error: error(.);",
"def break: error(\"break\");",
"def map(f): [.[] | f];",
"def map_values(f): .[] |= f;",