Allow negated object values without parens. Fixes #247

This commit is contained in:
Stephen Dolan committed 2013-12-17 22:28:31 +00:00
1 parent 0966230ba8
commit 18e828f17c
2 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -458,7 +458,9 @@ ExpD:
ExpD '|' ExpD {
$$ = block_join($1, $3);
} |
'-' ExpD {
$$ = BLOCK($2, gen_call("_negate", gen_noop()));
} |
Term {
$$ = $1;
}
+4
View File
@@ -36,6 +36,10 @@ null
null
[]
{x: -1}
null
{"x": -1}
# The input line starts with a 0xFEFF (byte order mark) codepoint
# No, there is no reason to have a byte order mark in UTF8 text.
# But apparently people do, so jq shouldn't break on it.