Commit Graph

21 Commits

Author SHA1 Message Date
Felix Krause a08f4c1e4e Sanitized exceptions and raises pragmas
* Added raises pragma to every proc in yaml.nim
 * Properly encapsulate exceptions from YamlStreams
 * Discovered a Nim compiler bug and added a workaround
 * Added possibility to query line, column and line content from
   YamlParser
 * Updated rst documentation
 * Actually call callback in fastparse if available
 * Fixed parsing YAML version
2016-01-24 18:24:09 +01:00
Felix Krause fdcc699768 Removed old lexer/parser impl in favor of new one
* fastparse now used for everything
 * private/[lexer|parser].nim gone
 * Made fastparse use YamlParser object
 * Got all tests working with fastparse
 * Some more smaller changes to API
2016-01-24 11:44:10 +01:00
Felix Krause 56d3537920 Refactoring: Shorter type names 2016-01-14 22:51:30 +01:00
Felix Krause 551c8b0dd1 Refactoring: Extracted type guessing from lexer 2016-01-14 19:58:38 +01:00
Felix Krause 46acdc3ccd Fixed presenter JSON output 2016-01-14 19:00:03 +01:00
Felix Krause a1b92a14de REALLY fixed presenter bug 2016-01-11 21:12:38 +01:00
Felix Krause fe583e8538 Debug output 2016-01-11 21:10:30 +01:00
Felix Krause bc9aa06d13 Fixed bug in presenter 2016-01-11 21:08:57 +01:00
Felix Krause 9f83b79bc0 Handle dBlockInlineMap in presenter 2016-01-11 21:03:46 +01:00
Felix Krause 2ed4499674 Do write '?' in ypsMinimal 2016-01-11 21:01:36 +01:00
Felix Krause f29a55c907 REALLY don't use newlines in ypsMinimal 2016-01-11 20:59:49 +01:00
Felix Krause 2d4746b56c No newlines in explicit flow maps for ypsMinimal 2016-01-11 20:58:24 +01:00
Felix Krause fc9607f959 Resolve non-specific tags in transform() 2016-01-11 20:54:06 +01:00
Felix Krause eb29582ef8 Output inline map for single key-value pair 2016-01-11 19:53:47 +01:00
Felix Krause 1e39ca5b6c Removed unneccessary mapMayHaveKeyObjects 2016-01-11 19:12:55 +01:00
Felix Krause f5627254f7 Fixed bug in presenter 2016-01-07 11:58:33 +01:00
Felix Krause 68f0ba0cc7 Added jester-based YAML parsing webservice
* Added server/server.nim
 * Fixed a problem in presenter that made it crash when
   outputting a root map to JSON
2016-01-05 21:34:07 +01:00
Felix Krause f3f6f5de9e Added explicit raises pragma to present()
* Added YamlPresenter*Error exceptions
 * Added raises pragma to present()
 * catch exceptions from YamlStream and Stream in present() and
   put them as cause into YamlPresenter*Error
 * Added loadToJson() proc
 * Give "~" the type hint yTypeNull
 * Always output "null" for yTagNull/yTypeNull scalars when
   presenter is in JSON mode
2016-01-05 19:58:46 +01:00
Felix Krause 18753b1a4a Got rid of yamlWarning, use YamlPresenterError
* Added YamlWarningCallback that may be used to capture
   parser warnings
 * Removed yamlWarning as event kind
 * Replaced checks for well-formedness in presenter with asserts
 * Added checks for JSON compatibility of YamlStream in presenter
 * Added proper type hints for special float values in
   serializer to be able to check for them in the presenter
2016-01-05 19:06:55 +01:00
Felix Krause d2baa1749e Got rid of yamlError.
* Replaced yielding yamlError tokens with raising a YamlParserError
 * Renamed sequential.nim to parser.nim because it's the parser (duh)
2016-01-05 18:14:11 +01:00
Felix Krause aa98c5863e Properly handle ytsRootOnly
* Yield tag of custom type serialization when using ytsRootOnly,
   but don't yield tags of map keys or values
 * Yield proper tag of Table[K, V] serialization if requested
 * renamed dumper.nim to presenter.nim to conform to YAML spec
2016-01-04 22:18:55 +01:00