Commit graph

132 commits

Author SHA1 Message Date
Erick Tryzelaar 85cd6f3e6e Rewrite the MapVisitor to add errors for a specific field 2015-08-13 08:25:56 -07:00
Erick Tryzelaar 8c33064c2c Override the numeric hints to not deserialize ints into floats, and vice versa 2015-08-13 08:25:56 -07:00
Erick Tryzelaar e5efc8801d Add a Deserialize::visit_enum that tries to deserialize into each variant
This could be more efficiently done if serde communicated the
number of arguments in each variant in this function.
2015-08-13 08:25:56 -07:00
Erick Tryzelaar b7b31bf9da Implement Serialize::visit_newtype_{struct,variant}
These functions allow a serializer to not wrap a newtyped value
inside of a tuple or struct.
2015-08-13 07:42:06 -07:00
Erick Tryzelaar bbc167cde9 Get serde feature compiling again 2015-08-12 23:01:49 -07:00
Erick Tryzelaar 4e0172a9a5 Merge remote-tracking branch 'remotes/origin/master' into serde 2015-08-12 22:15:58 -07:00
Alex Crichton b70f6e53b2 Don't need to qualify String 2015-08-11 09:18:52 -07:00
Ben Navetta 8a2282fecd it helps to actually build with serde enabled 2015-08-06 23:33:39 -04:00
Ben Navetta 00337d088e implement serde::Deserialize for Value 2015-08-06 23:30:08 -04:00
Alex Crichton 89332806c5 Improve the error message in failing enums 2015-06-23 17:45:48 -07:00
Alex Crichton 27a70d4024 Name the fields of the custom table AST 2015-06-08 00:04:30 -07:00
Alex Crichton 00baf76107 Add a few more tests for redefining tables 2015-06-07 23:58:45 -07:00
Alex Crichton 88461157f2 Clean up more style 2015-06-07 23:57:50 -07:00
Alex Crichton 68924534e2 Use deref coercions 2015-06-07 23:48:32 -07:00
Alex Crichton 6580b77a20 Re-structure control flow a bit + modernization 2015-06-07 23:47:22 -07:00
Andrzej Janik 8487b63c97 Rework fix for table redefinition to avoid breaking AST-compatiblity 2015-06-06 18:11:48 +02:00
Andrzej Janik 2fcd829b1d Disallow table redefinitions 2015-06-04 20:23:46 +02:00
Alex Crichton 94023b1d89 Fix serde-only compilation 2015-04-21 12:00:05 -07:00
Alex Crichton 3301c39630 Tweak some style 2015-04-21 09:16:06 -07:00
Oliver Schneider 6e2f2c39e4 most tests work now 2015-04-20 15:11:34 +02:00
Oliver Schneider ac86f4c941 updated to master 2015-04-20 12:29:58 +02:00
Alex Crichton 41563ee01b wip 2015-04-02 17:12:37 -07:00
Alex Crichton 2d49247b92 Modularize rustc-serialize support
* Add rustc-serialize as a default feature
* Make room for for serde support
2015-04-02 17:07:37 -07:00
Alex Crichton cd33b87bf9 Bump to 0.1.20 2015-04-01 09:56:05 -07:00
Alex Crichton c8a5ca4ece Bump to 0.1.19 2015-03-25 10:11:05 -07:00
Alex Crichton 2c5aa07722 Implement Encodable for Value
We can't generically decode into one, but we can generically encode one!

Closes #58
2015-03-20 10:53:36 -07:00
Alex Crichton b852af0a60 Improve test coverage 2015-03-15 11:26:32 -07:00
Alex Crichton ff3bb7d255 Reduce usage of unstable features 2015-03-09 11:09:07 -07:00
Alex Crichton e14c2052b7 Don't upload extra docs on travis 2015-03-03 20:35:04 -08:00
Steven Fackler 93e5ace69c Add a doc root url 2015-03-03 20:27:09 -05:00
Alex Crichton 1bebfa1394 Move away from deprecated syntax 2015-02-23 14:45:02 -08:00
Alex Crichton 26da27e628 Add support for numbers with underscores 2015-02-11 11:15:48 -08:00
Alex Crichton 95085dba9a Implement parsing of inline tables 2015-02-07 22:02:32 -08:00
Alex Crichton 0042025904 Bump to 0.1.16 2015-02-03 08:37:05 -08:00
Alex Crichton b3e9653b7f Properly escape keys when printing TOML
Closes #53
2015-02-02 22:54:46 -08:00
Alex Crichton 68e6c34b90 Move show.rs to display.rs 2015-02-02 22:30:06 -08:00
Alex Crichton c6b2aea11e Fix a deprecation warning 2015-02-02 22:29:51 -08:00
Alex Crichton 0a6a1cabde Add some feature gates 2015-01-29 08:42:02 -08:00
Alex Crichton 482752b5f4 Migrate to as many stable functions as possible 2015-01-27 19:29:58 -08:00
Alex Crichton 909a85069b Bump to 0.1.15 2015-01-23 08:19:29 -08:00
Alex Crichton 31d99cd425 Remove slash as an escapeable character 2015-01-20 10:00:43 -08:00
Alex Crichton 885db13d09 Don't infinite loop on bad keys 2015-01-19 13:16:42 -08:00
Alex Crichton 3536cb50e6 Update key syntax to TOML master
* Bare keys contain a very limited set of characters now.
* Keys in quotes behave the same as basic strings.

Closes #47
2015-01-15 19:47:56 -08:00
Alex Crichton 46a70861d5 Add some tests from the spec 2015-01-15 17:37:13 -08:00
Alex Crichton 0285af245a Implement new rules for bare key names
* Key names are restricted to [a-zA-Z0-9_-]
* Equal signs must be on the same line (as must the next value) as the key
* Quoted keys are allowed and are parsed as basic strings.

Closes #48
2015-01-15 17:34:27 -08:00
Alex Crichton bc825a5fb5 Expand float parsing to include exponents
Closes #50
2015-01-15 16:01:27 -08:00
Alex Crichton f098d70145 Disallow leading 0s in integers/floats 2015-01-15 15:37:48 -08:00
Alex Crichton f4b2045de0 Audit string parsing, fixing a few bugs here and there
Closes #51
2015-01-15 15:23:37 -08:00
Alex Crichton 5f2c7b4986 Tighten up CRLF parsing
Fix lots of false positives with stray \r characters and also fix CRFL parsing
in raw string literals with escapes.

Closes #49
2015-01-15 15:10:42 -08:00
Alex Crichton 9dd46d6fbf Fix parsing leading + on numbers 2015-01-15 14:27:55 -08:00