Define error/1 in terms of error/0
The parser generates a call to error/0 on break. Having that exported from C directly removes a language dependency on builtin.jq. In any case, error/0 seems to be the more fundamental operation, seeing as the old C impementation of error/1 did nothing useful with its input.
This commit is contained in:
1 parent
2fd725209e
commit
956d40d9dd
2 files changed
+4
-5
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
def halt_error: halt_error(5);
|
||||
def error: error(.);
|
||||
def error(msg): msg|error;
|
||||
def map(f): [.[] | f];
|
||||
def select(f): if f then . else empty end;
|
||||
def sort_by(f): _sort_by_impl(map([f]));
|
||||
|
||||
Reference in new issue
Block a user