Commit Graph

24 Commits

Author SHA1 Message Date
Evan Phoenix fa055bcbba Fix inserting values into a tree 2014-10-28 11:49:14 -07:00
eanderton d9de45b5b5 Revised after review
* Dropped 'script' support
* Improved documentation
* Made pathFn members private
2014-09-30 14:57:03 -04:00
eanderton d9e8f54d1c gofmt pass 2014-09-12 22:50:39 -04:00
eanderton 081f3db916 Final Toml-Path Solution
* Refactored type names and file names to mesh with existing TOML library more closely
* Added QueryResult structure that provides values and position data
* Added Query() method to TomlTree type
* Tests, tests, and more tests
* Fixed bug where positions returned from some tables were invalid
* Added test case for bug patch

The bugfix was an interesting case. Position information wasn't being
set in cases where createPath was called.  So table names like [foo.bar]
would result in table 'foo' having no position.
2014-09-12 22:32:15 -04:00
eanderton 2811a1a3c9 Added QueryResult and patched bugs
QueryResult now stores result items and position data, which aligns more
strongly with the rest of the library features than a plain
[]interface[}.  The design of the parser_test unittest was revised to
use array/map/scalar serialization (like match_test), since Go 1.3
redesigned maps to randomly order their keys. Since naive comparisons of
map data is now no longer possible, the unittest now sorts map
keys:value combinations.

* Patched a bug where getPosition("") was returning an invalid Position
* Revised parser_test to use serialization for comparisons for Go 1.3
2014-09-09 22:31:41 -04:00
Thomas Pelletier fb5423fba2 Fixes #22: Fixes style issues 2014-08-29 18:24:51 +02:00
eanderton 7c63fff960 Added Position Support to TomlTree
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
2014-08-26 21:00:41 -04:00
Thomas Pelletier 65684e6bb0 Fixes #20 : Creation of subgroup in table arrays 2014-08-14 10:12:39 +02:00
Thomas Pelletier bf549a2194 Run gofmt 2014-08-07 12:52:42 +02:00
eanderton 1f8a8cbc06 Added error context for parsing of subtrees 2014-08-06 08:20:53 -04:00
Philipp Brüll e9ae961088 extended Has function to work with paths 2014-07-09 16:34:41 +02:00
eanderton 5dd3b53635 Fixed formatting 2014-07-08 22:02:42 -04:00
eanderton 262211488d Fixed path handling and key group array name lexing for test compliance 2014-07-08 22:00:46 -04:00
eanderton 7b208738bc Fixed formatting; added name to license file 2014-07-07 21:06:42 -04:00
eanderton c8b5633273 Group array support; ToString() support 2014-07-07 20:48:29 -04:00
Thomas Pelletier dc20c454d7 Handle dots in keys 2013-12-10 21:51:40 +01:00
Thomas Pelletier c743c90315 Don't allow empty intermediate tables 2013-12-10 16:23:53 +01:00
Thomas Pelletier 8081f3cc09 Don't allow tables to be redefined 2013-12-10 16:10:26 +01:00
Thomas Pelletier 23d36c08ab Add GetDefault to TomlTree 2013-05-01 18:47:27 +02:00
Thomas Pelletier 558a227433 Run gofmt 2013-03-26 12:10:14 +01:00
Thomas Pelletier 21a8fb6ee0 Add LoadFile 2013-03-22 17:14:16 +01:00
Thomas Pelletier 2bd1eb4f21 Add tests for errors (fixes #5) 2013-03-22 15:23:53 +01:00
Thomas Pelletier 183bbe2aa9 Return an error instead of panicking 2013-03-22 15:03:51 +01:00
Thomas Pelletier 8783fed844 Readd source files. I need coffee now 2013-02-25 10:57:12 +01:00