Commit Graph

63 Commits

Author SHA1 Message Date
Vindaar 6b429e6571 replace deprecated 'dot' import / export by '/' 2018-10-12 16:00:39 +02:00
Felix Krause 834c4b174a doc link fixes 2016-10-01 15:19:42 +02:00
Felix Krause 1dc8ddc6ea got rid of yaml.common 2016-09-22 13:28:24 +02:00
Felix Krause 5dfc984913 Updated documentation for new structure 2016-09-21 21:20:57 +02:00
Felix Krause 12960b2e31 Restructuring: no more includes 2016-09-20 21:53:38 +02: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 92f5a7a6fd got parse.nim to compile again
* it is still pretty broken
2016-09-12 21:38:56 +02:00
Felix Krause 7376af7d6f started patching parse.nim 2016-09-12 18:04:26 +02:00
Felix Krause d51872f9e7 Started work on new lexer 2016-09-10 10:30:40 +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 ef9159ab98 Removed trailing ws; JS fixes
* do not call writeStackTrace() if compiling to JS
2016-08-30 22:15:29 +02:00
Felix Krause 34cbe61479 Got rid of lots of compiler warnings 2016-08-17 22:50:37 +02:00
Felix Krause 30365d2f17 More refactoring
* Renamed ParserYamlStream to ParserContext
 * Moved almost all internal state from YamlParser to ParserContext
2016-08-17 22:21:34 +02:00
Felix Krause 01b34290b7 Parser refactoring
* refactored parser to not use first class iterators
   (not available for JS backend)
 * Current state misses flow style handling and fails tests
2016-08-15 21:30:49 +02:00
Felix Krause 4ddc094cfd Internal changes to YamlStream (no API change)
* Prepared YamlStream for major parser refactoring
2016-08-10 20:42:44 +02:00
Felix Krause b6f730c459 Fixes #25 2016-08-09 21:20:25 +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
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 592158fad0 Merge branch 'master' into variant-objects 2016-05-25 23:18:32 +02:00
Felix Krause f5431af0fd fastparse refactoring, part III
* Changed some more templates to procs
2016-05-23 21:10:28 +02:00
Felix Krause 78fac63af5 fastparse refactoring, part II
* Transformed quite some templates to procs
 * Moved quite some local vars from parse() to YamlParser
2016-05-21 23:26:39 +02:00
Felix Krause f73dfdc6ab Worked on variant objects (not working) 2016-05-09 19:03:11 +02:00
Felix Krause 273093e390 improved setTagUri
* renamed setTagUriForType to setTagUri
 * generated TagId is now const (can be used in case etc)
 * Uses compile-time counter independent from tag library
2016-04-21 18:58:53 +02:00
Felix Krause 62fa366ac7 Check for duplicate tag URIs at compile time 2016-04-09 21:54:49 +02:00
Felix Krause 4ca4b2c87e Support nil strings and seqs 2016-04-04 21:21:24 +02:00
Felix Krause 6ad7e33bb5 Reduced dead code and compiler warnings 2016-04-03 11:45:48 +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 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 eef247b2e8 Fixed parser bug, added option to output YAML 1.1
* Fixed a parser bug that got confused when looking for an implicit
   map key in a plain scalar that contains &, * or !
 * Added OutputYamlVersion to PresentationOptions
2016-03-20 10:31: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 56d49ec308 Formatting fix in generated doc 2016-02-26 22:18:31 +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 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
Felix Krause c6c13eb044 Better doc index. YamlStream now an object.
* Also various fixes to serialization and presentation
2016-02-12 19:53:25 +01:00
Felix Krause cb18c5cb9c Improved documentation 2016-02-02 21:14:56 +01:00
Felix Krause 32c42054f7 Renamed serialize() to represent() to better conform to YAML spec 2016-02-02 18:19:40 +01:00
Felix Krause b7828884bd Documentation fixes.
* Some typo fixes in code
 * nim documentation now generates API doc with source links
 * presenter now uses "" if a string starts with @ or `
 * Removed some outdated stuff
2016-01-24 19:15:50 +01:00
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