Commit Graph

96 Commits

Author SHA1 Message Date
Thomas Pelletier 6b9002d8f9 Harden tests for bad arrays 2015-09-09 17:33:28 +01:00
Thomas Pelletier 5753e884d0 Fix floating points with underscores 2015-09-09 17:17:08 +01:00
Thomas Pelletier 821a80e635 Add removed test 2015-09-09 17:01:05 +01:00
Thomas Pelletier dd4c4ffc2b Implement inline tables 2015-09-09 16:56:18 +01:00
Thomas Pelletier f58048cec0 Merge pull request #39 from pelletier/pelletier/integers_underscores
Accept underscores in integers
2015-07-17 16:54:19 -07:00
Thomas Pelletier 894e775e38 Accept spaces in keys 2015-07-16 23:04:13 -07:00
Thomas Pelletier 8e75093380 Accept underscores in integers 2015-07-16 22:07:16 -07:00
Thomas Pelletier 9defd66d3c Parse datetimes in UTC 2015-07-15 10:58:08 -07:00
Thomas Pelletier 36e1197190 Test datetimes differently 2015-07-15 08:17:28 -07:00
Thomas Pelletier 16a681db2a Allow numbers in keys parsing 2015-07-14 19:56:28 -07:00
Thomas Pelletier 9f36448571 Basic keys parsing 2015-07-14 16:33:33 -07:00
Thomas Pelletier a8327d781a Specifiy timezone name 2015-04-23 15:42:25 -07:00
eanderton 1f3d0e03c3 Changes to support #29 - Support multi-line literal strings
* Added error output to test_program.go
* Added multi-line literal string support to lexer
* Added multi-line string supprt to lexer
* Added unit-test for new string support
* Modified test.sh to take an optional parameter to run an individual BurntSushi test suite.
* Fixed formatting
2015-02-26 18:03:30 -05:00
Thomas Pelletier 4b47f52cb0 Fixes #31 : Use RFC 3339 for datetimes 2014-12-06 15:00:24 +01:00
Thomas Pelletier 2f2f28631b Fixes #32 : Ensure keys are correctly parsed 2014-12-06 14:16:42 +01:00
Thomas Pelletier 543444f747 Fixes #30: Implement exp notation in floats 2014-12-06 13:56:27 +01: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
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
eanderton aa194b5c41 Revised error message in parser test 2014-08-06 20:30:30 -04:00
eanderton 14e2d94bdd Added missing test entry 2014-08-06 20:28:44 -04:00
eanderton 1f8a8cbc06 Added error context for parsing of subtrees 2014-08-06 08:20:53 -04:00
eanderton 6db660fed5 Revised error formatting, fixed tests 2014-08-06 08:15:05 -04:00
eanderton 7d9a3c25bd Revised error reporting 2014-08-06 07:34:01 -04:00
eanderton c9ea292f59 Additional formatting 2014-07-07 21:08:57 -04:00
eanderton c8b5633273 Group array support; ToString() support 2014-07-07 20:48:29 -04:00
Thomas Pelletier a4d623ad05 Fix implicit declaration 2013-12-10 19:29:01 +01:00
Thomas Pelletier 3085454477 Don't allow duplicate keys 2013-12-10 17:50:59 +01:00
Thomas Pelletier 01609e0ab7 Add some tests for nested empty arrays 2013-12-10 17:46:30 +01:00
Thomas Pelletier 278c4d97ec Don't allow floats starting with a dot 2013-12-10 17:17:15 +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 72f17747a0 Prevent mixed types in arrays 2013-12-10 15:45:50 +01:00
Thomas Pelletier be268e4049 Include @cmars tests 2013-12-09 17:25:31 +01:00
Thomas Pelletier 558a227433 Run gofmt 2013-03-26 12:10:14 +01:00
Thomas Pelletier edc78bc0bf Add test for newlines in arrays 2013-03-26 11:52:42 +01:00
Thomas Pelletier 329092b812 Implement escapable characters in strings 2013-03-26 11:45:36 +01:00
Thomas Pelletier 8c48e59100 Develop ParseFile test 2013-03-26 11:35:18 +01:00
Thomas Pelletier 8a5d380286 Fix strings lexing and add a few tests 2013-03-26 10:53:49 +01:00
Thomas Pelletier 21a8fb6ee0 Add LoadFile 2013-03-22 17:14:16 +01:00
Thomas Pelletier 0d489ff32c Add couple of tests for arrays 2013-03-22 15:27:00 +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