Extend {foo} syntax to allow {"foo"} as well.

Useful when "foo" contains unusual characters. Should help with
the issues #7, #38, #40, #42.
This commit is contained in:
Stephen Dolan committed 2012-12-03 20:31:40 +00:00
1 parent 5f6a95c7b5
commit a88d53d2fd
4 files changed
+20

No files matched your search

+11
View File
@@ -208,6 +208,17 @@ jv jq_next() {
break;
}
case DUP2: {
stackval keep = stack_pop();
stackval v = stack_pop();
stackval v2 = v;
v2.value = jv_copy(v.value);
stack_push(v);
stack_push(keep);
stack_push(v2);
break;
}
case SWAP: {
stackval a = stack_pop();
stackval b = stack_pop();