Commit Graph

40 Commits

Author SHA1 Message Date
GaveUp 2c470c8aa9 Add octal/hex support. Add multi doc support. 2016-09-19 14:40:03 -05:00
Felix Krause 2f3a809738 Support JS string output in presenter 2016-09-19 19:33:29 +02:00
Felix Krause 4670450a27 Fixed bench and remaining problems 2016-09-14 14:35:41 +02:00
Felix Krause 78fa4ac5e3 Improvements to exception handling 2016-09-13 12:01:21 +02:00
Felix Krause 92f5a7a6fd got parse.nim to compile again
* it is still pretty broken
2016-09-12 21:38:56 +02:00
Felix Krause 5a90255993 Fixed remaining JS compilation issues
* Changed transform() to not use first class iterators
 * provide a archaic `$` for uints that will break if
   poked
 * TODO: test JS output!
2016-09-01 21:08:27 +02:00
Felix Krause ad18db5113 Do not use first class iterators in serialization
* needed for JS backend
2016-09-01 20:56:34 +02:00
Felix Krause 34cbe61479 Got rid of lots of compiler warnings 2016-08-17 22:50:37 +02:00
Felix Krause 09824f931b Refactoring of assertions, improved exceptions
* Replaced all assert statements with yAssert, which prints an error message
   and quits on failure, but does nothing when compiling with -d:release.
 * Implemented and used internalError for better discovery of internal bugs.
   Fixes #8.
 * Made RawYamlStream able to raise YamlStreamError, which might primarily be
   useful for user-defined serialization
 * Properly encapsulate RangeError coming from int/uint serialization on 64bit
   machines in YamlStreamError.
 * Some minor style improvements
2016-08-09 20:47:22 +02:00
Andrea Ferretti e33af48217 Fixed issue: integer numbers could not be parsed as float 2016-07-08 11:35:31 +02:00
Felix Krause 9054bf7630 Fixes #19 2016-07-07 17:46:23 +02:00
Felix Krause b01270dc9e Fixes #17 2016-06-26 12:41:06 +02:00
Felix Krause 7cad7b5478 Fixed and properly implemented variant objects 2016-06-08 19:15:50 +02:00
Felix Krause 152a4f3bd3 NimYAML version 0.5.1
* Fixed a problem that was caused by a change in getType in Nim devel
2016-06-05 20:52:43 +02:00
Felix Krause 48aeff20c0 Use variant object types for heterogeneous data
* Made variant object types work (really this time)
 * Added `markAsImplicit`
 * Implemented implicit variant object types
 * Added documentation
2016-06-05 19:29:16 +02:00
Felix Krause e81da97a17 Removed most of variant-object specific code
* fieldPairs() already handles variant objects fine. decided not to
   go further along the way of identifying object variants by their
   discriminants in tag URIs.
 * variant objects are now supported just like normal objects.
2016-06-05 15:43:39 +02:00
Felix Krause a0c435d6eb Finally got variant objects to work
* may still require some polish before merging
2016-05-25 23:32:49 +02:00
Felix Krause f73dfdc6ab Worked on variant objects (not working) 2016-05-09 19:03:11 +02:00
Felix Krause 4ca4b2c87e Support nil strings and seqs 2016-04-04 21:21:24 +02:00
Felix Krause 58b9b92895 Support int, uint and float types. 2016-04-04 20:44:16 +02:00
Felix Krause 6ad7e33bb5 Reduced dead code and compiler warnings 2016-04-03 11:45:48 +02:00
Felix Krause f2c83cc170 Support array types. Updated documentation 2016-04-03 11:29:49 +02:00
Felix Krause a267f73e0a Serialization: support sets 2016-04-02 18:29:26 +02:00
Felix Krause cde346b85c Switched to indentation of 2 spaces 2016-04-02 17:48:22 +02:00
Felix Krause 7063e72ace Added advanced example to index.html 2016-03-25 23:12:00 +01:00
Felix Krause 5ec086081c Implemented serialization of OrderedMap 2016-03-25 22:22:42 +01:00
Felix Krause 06faf4966d Object fields get the tag !nim:field. Fixes #12. 2016-03-25 21:38:28 +01:00
Felix Krause 42ddfbe5c5 Fixes #13.
* Separated into representObject and in representChild and
   representObject. Makes it possible for multiple types to
   use the same representObject proc.
2016-03-25 21:27:41 +01:00
Felix Krause 57b4518564 Fixed presenter bug
* Fixed TagIds for Nim's system types
 * Output JSON integers for Nim's integer types
 * Output JSON floats for Nim's float types
2016-03-20 19:55:23 +01:00
Felix Krause 4eb9685a57 code style: use compact blocks where possible 2016-03-17 19:30:40 +01:00
Felix Krause 16d1a1bceb Various code style and naming fixes
* Renamed some symbols for consistency, fixes #6:
   - yamlStartSequence -> yamlStartSeq
   - yamlEndSequence   -> yamlEndSeq
   - yamlStartDocument -> yamlStartDoc
   - yamlEndDocument   -> yamlEndDoc
   - yTagMap           -> yTagMapping
 * Improved code formatting at some places
 * Fixed code documentation at some places
 * Added generic objects to TODO list
 * Removed obsolete parsing tests, these are superseeded
   by yaml-dev-kit test suite integration
2016-03-14 18:10:34 +01:00
Felix Krause 5933605591 Added copyright notices to files where missing 2016-02-27 13:09:50 +01:00
Felix Krause 46913867e2 Presenter: Let user decide about newline style
* Added PresentationOptions object; merged PresentationStyle,
   indentationStep and NewLineStyle in it
 * Updated signatures of relevant procs
 * Implemented user-defined newline style in presenter
2016-02-26 21:55:59 +01:00
Felix Krause 349cb19912 Refactoring of serialization code
* Made some procs/templates private that have been public without need
 * Improved documentation of procs
2016-02-26 21:13:40 +01:00
Felix Krause 27670f63c9 Implemented and documented DOM 2016-02-22 21:56:30 +01:00
Felix Krause 33a7f93480 Code cleanup; reduced compiler hints 2016-02-19 18:25:01 +01:00
Felix Krause 9be97ff386 Added constructChild for better serialization.
- Handle tag and anchor checks and ref types in constructChild
 - Added tests for using custom representObject and constructObject
   procs
 - Code cleanup
2016-02-16 19:24:55 +01:00
Felix Krause 0a7f87a539 Improved docs. Fixed serialization problem.
* Added serialization.txt to doc
 * Fixed rendering problem in api.txt
 * Use explicit tag when ref type renders to a scalar that can be
   parsed to !!null
 * Added test cases for this ref type fix
2016-02-15 22:54:05 +01:00
Felix Krause 02e505959a Added setTagUriForType. Used it. Improved docs. 2016-02-15 19:46:21 +01:00
Felix Krause 325e3ec18f Made serialization part of yaml. Improved doc. 2016-02-12 20:44:38 +01:00