Thomas Pelletier
439fbba1f8
Make lexComment jump back to the previous state ( #122 )
...
When a comment appears in an rvalue, the lexer needs to jump back to
lexRValue, not to lexVoid.
Fixes #120 .
2016-12-29 19:51:04 +01:00
Thomas Pelletier
ce7be745f0
Rename group to table ( #115 )
...
* Rename Group to Table Fixes #45
* Change fmt.Errorf to errors.new for simple strings
2016-12-03 12:32:16 +01:00
Cameron Moore
0599275eb9
Simplify redundant types in literals ( #95 )
...
Using `gofmt -s`
2016-08-23 09:45:54 +02:00
Thomas Pelletier
64ff1ea4d5
Don't hang when reading an invalid rvalue ( #77 )
...
Fixes #76
2016-06-30 16:21:25 +02:00
Thomas Pelletier
8d9c606c69
Improve test coverage ( #66 )
2016-04-22 14:26:15 +02:00
Thomas Pelletier
1a8565204c
Fix multiline strings ( #62 )
2016-04-21 17:47:41 +02:00
Cameron Moore
6e26017b00
Clean up lint ( #56 )
...
The only real change in this commit is that MaxInt is made private.
Everything else should be gofmt'ing, docs and cleanup of lint.
2016-04-18 16:58:23 +02:00
Thomas Pelletier
2df083520a
Fix support for CRLF line ending
2016-02-19 14:12:13 +01:00
Thomas Pelletier
f963bc320f
Generic input
...
Fixes #47
2016-01-31 16:54:40 +01:00
Thomas Pelletier
6d743bb19f
Improve error checking on number parsing
2015-12-01 14:38:33 +01:00
Thomas Pelletier
07d0c2e4d3
Merge branch 'master' into pelletier/inline-tables
2015-09-09 17:35:03 +01:00
Thomas Pelletier
5753e884d0
Fix floating points with underscores
2015-09-09 17:17:08 +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
440592fa85
Merge pull request #40 from pelletier/pelletier/space-in-keys
...
Accept spaces in keys
2015-07-17 16:53:53 -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
cf5ad6a245
Fixes #27 : Reject full 00 - 1F unicode range
2015-07-16 21:54:10 -07:00
Thomas Pelletier
41a8959f14
Reject new lines in keys
2015-07-14 20:07:43 -07:00
Thomas Pelletier
16a681db2a
Allow numbers in keys parsing
2015-07-14 19:56:28 -07:00
Thomas Pelletier
222e90a7d3
Parse long unicode
2015-05-21 18:52:26 -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
a56707c85f
Fixes #28 : Support of literal strings
2014-12-06 15:23:37 +01: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
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
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
bf549a2194
Run gofmt
2014-08-07 12:52:42 +02:00
eanderton
dd04a2f3cd
Added line/col support to lexer
2014-08-06 07:13:15 -04:00
eanderton
7b208738bc
Fixed formatting; added name to license file
2014-07-07 21:06:42 -04:00
Thomas Pelletier
dc20c454d7
Handle dots in keys
2013-12-10 21:51:40 +01:00
Thomas Pelletier
0c4e891f3e
Handle non-alpha chars in keys
2013-12-10 19:46:56 +01:00
Thomas Pelletier
01609e0ab7
Add some tests for nested empty arrays
2013-12-10 17:46:30 +01:00
Thomas Pelletier
a34fc5f051
Don't allow invalid escape sequences
2013-12-10 17:34:11 +01:00
Thomas Pelletier
e8d5dbf787
Don't allow two equals for the same key
2013-12-10 17:28:16 +01:00
Thomas Pelletier
5ffe2e5565
Don't allow float to end with a dot
2013-12-10 17:24:53 +01:00
Thomas Pelletier
0f6008f46e
Add some tests for the lexer
2013-12-09 19:05:18 +01:00
Thomas Pelletier
53005a205f
Handle keys with dash. ref #10
2013-12-09 17:12:07 +01:00
Thomas Pelletier
34e1e282fa
Add test for unicode string
2013-07-01 21:40:08 +02:00
Thomas Pelletier
71141675e5
Fixes #6 : implement \uXXXX escaping
2013-07-01 21:38:00 +02:00
Thomas Pelletier
8a5d380286
Fix strings lexing and add a few tests
2013-03-26 10:53:49 +01:00
Alexander Staubo
4e227cb34e
Support underscores and uppercase letters in key names, as well as international characters (not specified in TOML spec, but implied by Unicode and JSON compatibility). Fixes #3 .
2013-03-19 06:17:28 +01:00
Thomas Pelletier
8783fed844
Readd source files. I need coffee now
2013-02-25 10:57:12 +01:00