* Added public Query interface
* Added filter function callback support
* Added "script" function callback support
Queries are generated via Compile(), which then may be run via Execute()
as many times as needed. Much like compiling a regex, this is done to
elide the need to re-parse and build the funciton tree for each
execution.
The distinction between 'filter' and 'script' is borrowed from their
syntactic equivalents in jsonpath. Right now, these accept no arguments
in the query, and instead merely pass the current node to the callback.
Filters return a bool and determine if the node is kept or culled out.
'Scripts' return a string or an in64, which is in turn used in an index
or key filter (respectively) on the current node's data.
A few callbacks are provided by default, with the ability to add
additional callbacks before calling Execute() on a compiled query.
As it turns out, closures are very hard to validate without running them.
Since table-driven tests tend to rely on value types that can be
compared directly, using structs that adhere to a generic callback
interface is more work, but is more easily tested.
* Changed jsonpath match functions to structs with Call() methods
* Added tests to verify the generation of jsonpath QueryPath data
* Added tests to verify jsonpath lexer
* Fixed jsonpath whitespace handling bug
* Fixed numerous flaws in jsonpath parser
TomlDocument provides an optional TOML processing path where position
informaiton is stored alongside a TomlTree.
* Added Position struct
* Revised TomlTree to contain position data
* Added tomlValue to bind positions to values
* Revised parser to emit position data
* Revised token to use new Position struct
* Added tests for new functionality
* Bugfixed table array duplicate key handling
* Applied gofmt to all code