Commit Graph
26 Commits
Author SHA1 Message Date
Stephen Dolan d5fdf70434 Refactor assignment.
New version is much more elegant and probably slower. Uses
library functions implemented in jq rather than dedicated opcodes.
2012-12-29 16:43:36 +00:00
Stephen Dolan 465a4ec565 Improvements to del(foo).
del(foo,bar) is now very different from del(foo),del(bar).
See #37.
2012-12-29 16:13:06 +00:00
Stephen Dolan 3a5377e183 Fix a bug in URI-encoding of certain non-ASCII characters.
Oh how I hate C casting rules.
2012-12-29 01:37:22 +00:00
Stephen Dolan 79c9c418c6 Path manipulation (path/getpath/setpath/delpath) and docs.
del function should fix #37.
2012-12-28 16:08:29 +00:00
Stephen Dolan 417899f9a0 Fold operation (code/docs/test) 2012-12-28 15:05:34 +00:00
Stephen Dolan 89e26969ae @foo syntax for encoding of strings into various formats.
Fixes part of #47 and #48.
2012-12-28 01:23:09 +00:00
Stephen Dolan 5968f54f55 Fix a bug in stack reallocation during deep recursion. 2012-12-18 17:36:24 +00:00
Stephen Dolan 84026f0513 Change order of evaluation for certain indexing operations.
'.foo[.bar]' used to parse like '.foo | .bar as $b | .[$b]',
now it parses like '.bar as $b | .foo | .[$b]'.
2012-12-07 00:28:11 +00:00
Stephen Dolan c0a2f1ab47 Add min, max, min_by, max_by functions. 2012-12-04 22:45:03 +00:00
Stephen Dolan a88d53d2fd Extend {foo} syntax to allow {"foo"} as well.
Useful when "foo" contains unusual characters. Should help with
the issues #7, #38, #40, #42.
2012-12-03 20:31:40 +00:00
Stephen Dolan fadeb66365 Add a unique function. 2012-12-03 02:02:12 +00:00
Stephen Dolan 67f8ad9435 Ignore a UTF-8 BOM if one appears at the start of a JSON document.
Closes #45.
2012-12-02 23:53:55 +00:00
Stephen Dolan 11965aaa2e sort_by and group_by functions, tests and docs. 2012-12-02 23:22:15 +00:00
Stephen Dolan ed7f95a492 Demote "contains" to a built-in function rather than an operator. 2012-12-02 22:52:38 +00:00
Stephen Dolan 63d10433c9 Fix a horrible scoping/associativity bug.
`1 as $x | . | $x` didn't compile, as it was parsed as

    (1 as $x | .) | $x

where `$x` is undefined, rather than as

    1 as $x | (. | $x)
2012-12-02 22:22:08 +00:00
Stephen Dolan 9e743d517a Sort function and more general comparison operators. 2012-11-30 20:27:16 +00:00
Stephen Dolan 2dad2bdd97 Merge remote-tracking branch 'origin/master' 2012-11-26 22:24:04 +00:00
Stephen Dolan 924aeda504 Add some preprocessor junk to make codegen cleaner. 2012-11-25 23:49:57 +00:00
Stephen Roantree 5e25c2a259 Implemented contains operator 2012-10-24 13:50:26 -07:00
Damian Gryski 45b6fc8148 Add some in/equality test cases 2012-10-23 21:12:47 +02:00
Stephen Dolan 32e1b114df Add a 'keys' function. Fixes #4. 2012-10-20 00:26:37 +01:00
Stephen Dolan afec2544f1 A string interpolation syntax that I don't hate. Also tests.
You can interpolate values into strings using \(this syntax), e.g.

    "best \("str" + "ing") ever"
2012-10-20 00:09:20 +01:00
Stephen Roantree 0618e61e0b Add <,>,<=,>= binops 2012-10-07 22:34:12 +01:00
Stephen Dolan a2643cc0d5 Allow underscores in IDENT tokens. Fixes #3.
IDENT syntax now includes ASCII letters and underscores, so
'.foo_bar' now works. Non-ASCII letters won't work in IDENT
tokens (it's impossible to tell which non-ascii characters are
"letters" without full unicode tables), so '.données' is still
a syntax error (the workaround is '.["données"]', since you can
put anything you like in a string).
2012-09-22 14:03:46 +01:00
Stephen Dolan 5863160112 Implement the 'add' builtin promised by the docs' examples. 2012-09-18 23:32:24 +01:00
Stephen Dolan a4eea165bb Move everything around - delete old Haskell code, clean up build. 2012-09-18 17:44:43 +01:00