30 Commits

Author SHA1 Message Date
Felix Krause
940675a52e Reworked loading API
* moved load procs to yaml/loading.nim
 * moved input YamlStream into ConstructionContext
 * made ConstructionContext a non-ref object
 * harmonized code style & comments
 * renamed yaml/serialization.nim to yaml/native.nim
2023-08-29 23:23:15 +02:00
Felix Krause
18fc8ba3f5 Reworked dumping API
* removed default value objects,
   use Nim2 default vaules for fields instead.
 * moved dump procs to yaml/dumping and introduced Dumper
 * modified serialization procs to use ctx as first argument,
   so that prefix calls can be used
 * changed defaults for presentation to be more like other
   YAML implementations, e.g. no directives by default.
 * Removed deprecated procs in DOM API
 * Removed PresentationStyle – use the setXStyle procs of Dumper
   instead.
 * Fixed some warnings emerging from transitioning to Nim2
2023-08-29 20:46:26 +02:00
Felix Krause
39444f6536 Consolidated exceptions 2023-03-18 13:54:45 +01:00
Felix Krause
034b9b8453 Reworked some exceptions and compiler warnings
* LexerError is properly rewritten as YamlParserError in parser
 * updated some code to remove warnings and hints that got emitted
 * Fixes #129
2023-03-13 22:06:07 +01:00
xflywind
7dd8e88639 make nimyaml works with stricteffects 2022-10-14 21:41:51 +02:00
Felix Krause
7bd562e37e Fixes and improvements to DOM API.
* added loadFlattened. Fixes #117
 * fixed an error where recursive nodes were not loaded
   properly into YamlNodes.
 * made dump with asNone raise an error when a cycle is
   encountered, instead of running into an endless loop.
2022-09-07 16:23:50 +02:00
xflywind
a5552a1a18 replace shallowCopy for ARC/ORC 2022-08-29 16:30:26 +02:00
metagn
c7d8aa6467 Change deprecated type pragma syntax
Sorry that this messes with the style here, but it would be nice to have this syntax removed given how long it's been deprecated (https://github.com/nim-lang/Nim/pull/20199).
2022-08-11 09:14:42 +02:00
Felix Krause
947207dd02 added marks and styles to YamlNode 2022-08-02 19:46:58 +02:00
Felix Krause
741fd18047 Deprecated DOM API, YamlNode now supported by serialization API
* implements #48
 * also fixes #108
 * updated docs
2022-06-05 12:27:19 +02:00
Felix Krause
d20707c4e4 disable DOM API when using ARC (ref #85) 2021-05-18 00:42:58 +02:00
Felix Krause
1346467b42 fixes #93 2021-05-18 00:31:47 +02:00
Felix Krause
329e18e44c removed obsolete TagLibrary type. control tag directives when dumping. fixes #95 2021-03-23 18:51:05 +01:00
Felix Krause
f79774e766 updated raises annotations 2020-11-10 21:28:56 +01:00
Felix Krause
e3e810fce0 all tests green again 2020-11-10 19:07:46 +01:00
Felix Krause
4305bccbf0 made anchor resolution during deserialization safer 2020-11-10 14:48:19 +01:00
Felix Krause
aa65c066d5 changed TagId to Tag. removed JS stuff that wasn't working anyway. 2020-11-10 13:55:22 +01:00
Felix Krause
48d601d959 parser tests working, other tests compiling 2020-11-06 16:21:58 +01:00
Felix Krause
4c604b09df made lexer & parser tests compile (not succeed) again 2020-11-04 16:40:37 +01:00
Felix Krause
1d707b184e started updating other parts of the codebase 2020-11-03 22:08:21 +01:00
flyx
f714881ae9 Fixed submodules. Fixed some depr warnings. Fixes #77 2020-03-08 19:22:34 +01:00
k0zmo
fd4a718586 Adhere to new rules of object variants (re)initialization 2019-07-06 11:14:34 +02:00
majj
51d33d4a05 experimental: notnil 2018-08-24 13:30:05 +02:00
Felix Krause
f07cf173dc Fixed to previous JS adjustments 2017-03-30 17:58:53 +02:00
Felix Krause
7ba95845e0 JS improvements; also added constructObjectDefault 2017-03-29 21:42:07 +02:00
Felix Krause
0ef9cbf535 Moved private sources to yaml/private 2017-02-06 20:39:04 +01:00
Felix Krause
84d4127caf Improved DOM API
* yMapping is now a Table
 * changed names to match those of the json module
 * implemented procs to easier get and set values
2016-11-28 20:17:04 +01: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