Commit Graph

423 Commits

Author SHA1 Message Date
Vindaar da9396a2f3 remove internal string assert test 2018-10-12 16:00:39 +02:00
Vindaar 06ddc9eb13 Revert "fix internal `IndexError` in `lex.nim` due to null term n.a."
This reverts commit e147df31718bb5bcd27c4067314dc40c2ecc9348.
2018-10-12 16:00:39 +02:00
Vindaar e104dc351d [tojson] extend `Level` by `expKey` to signal node expects a key
Extens the `Level` type in `tojson` by a `expKey` field, which is used
to indicate whether a node still expects a key or not.

NOTE: not sure if the `expKey = true` statements in lines 163 and 183
are necessary / correct. Tests work this way though.
2018-10-12 16:00:39 +02:00
Vindaar 407b10be66 do not construct empty seq for `yamlScalar` 2018-10-12 16:00:39 +02:00
Vindaar d19539a231 fix internal `IndexError` in `lex.nim` due to null term n.a.
Since the null terminator is not available anymore we need to be
careful how we access strings in the lexer.

This should probably be solved in a nicer and more scalable way! :/
2018-10-12 16:00:39 +02:00
Vindaar 446493ded8 replace `newException` by `constructionError` call if int too large
If an integer doesn't fit into the target type an exception is thrown.
2018-10-12 16:00:39 +02:00
Vindaar db1a2c4041 allow echoing internal stacktrace if compiling with `d:debug`
`internalError` and `yAssert` now allow to echo the internal stack
traces if the `d:debug` compile flag is set.
2018-10-12 16:00:39 +02:00
Vindaar f0eeece22d remove unnecessary cast on return value of `newStringOfCap` 2018-10-12 16:00:39 +02:00
Vindaar ebe4201cbc replace `assertStringEqual` by version checking for content and len
Now check for content *and* length of the strings in
`tserialization`. Also adds a test case for the case with which the
old version would have failed (one string longer than the other, thus
being different).

This version tries to keep the error reporting mechanism the same as
the old version.
2018-10-12 16:00:39 +02:00
Vindaar 53c476ce38 remove unnecessary if branch related too seq construction
Not needed anymore, since seqs can never be nil nowadays.
2018-10-12 16:00:39 +02:00
Vindaar 81e50d73d9 remove commented out old code 2018-10-12 16:00:39 +02:00
Vindaar 253a4623e4 circumvent RangeError, which will be wrongly caught
Converting an integer via `T(number)` to some integer will cause a
range error, if it doesn't fit. Maybe it didn't in the past, which is
why the code worked before? Some other error was thrown?
With this code anyway it crashed, because it threw an internal error.
2018-10-12 16:00:39 +02:00
Vindaar 9a445c18bb fix `assertStringEqual` to make sure not to access null terminator 2018-10-12 16:00:39 +02:00
Vindaar f290876df7 replace `echo` + `quit(1)` by error call in `tquickstart.nim`
The call to `quit 1` failed on my machine. Hence use macros.error.
2018-10-12 16:00:39 +02:00
Vindaar fb13dc1627 further `isNil` checks in `tserialization` fixed 2018-10-12 16:00:39 +02:00
Vindaar 4821ef95fb [soft] take out yTagNimNilString/Seq and related (?) nil tests 2018-10-12 16:00:39 +02:00
Vindaar 7ad13d98d9 force vals in `quote do` to bool due to compile time when changes 2018-10-12 16:00:39 +02:00
Vindaar 011c99270f fix regression in times.parse syntax due to changes in times module
Probably due to the changes in the times module, the old syntax throws
an error now.
2018-10-12 16:00:39 +02:00
Vindaar 048f6615f5 fix for null terminator not accessable in strings anymore 2018-10-12 16:00:39 +02:00
Vindaar 890bbed5ed further `nil` fixes in `tojson` and `serialization` 2018-10-12 16:00:39 +02:00
Alexander Ivanov 566e28dcc5 Make it work with new not nil 2018-10-12 16:00:39 +02:00
flyx 6ca2a8e98a
README update
* project status
 * deleted transient fields from future feature list because it's implemented
2018-08-30 09:49:02 +02:00
Alexander Ivanov ba53fc0494 Load 0 fix #60 2018-08-30 09:21:30 +02:00
majj ddf22a3a41 experimental: notnil 2018-08-24 13:30:05 +02:00
majj 51d33d4a05 experimental: notnil 2018-08-24 13:30:05 +02:00
Marcus Eriksson 2328289dba Fixes #54 2018-05-29 19:12:03 +02:00
flyx e9658f22ec
Fixes #49 2017-11-14 15:52:11 +01:00
Jacob MacDonald 78758c87ff Fix Travis build for Nim devel.
csources does not have a devel branch.
2017-10-09 10:43:11 +02:00
Jacob MacDonald 4933194dd6 Fix for newer versions of compiler.
61720e0df9475af647de171f6b2964c36234961a in the Nim compiler introduced the bug
in this project. In brief, the upstream change flattens `nnkStmtList`s of one
item. Thus, `quote do:` followed by one statement is no longer a nnkStmtList
but whatever that one statement is. This breaks several macro implementations
where a `quote do:` form is initialized and then appended to. Based on Araq's
feedback (https://irclogs.nim-lang.org/02-10-2017.html#21:01:26), these
single-statement quotes are now converted into one-element statement lists as
necessary (behavior on old versions of the compiler is maintained).
2017-10-03 15:59:45 +02:00
Felix Krause e7e532ccb8 Version 0.10.3 2017-09-20 19:04:57 +02:00
Felix Krause 8d8464da71 Fixes #43 2017-09-20 18:58:09 +02:00
Felix Krause af58ab68de Version 0.10.2 2017-08-30 18:14:08 +02:00
Felix Krause 37031c4c80 make tests green again 2017-08-30 18:11:18 +02:00
Felix Krause 78b029d17d Merge branch 'master' into devel 2017-08-30 18:06:18 +02:00
Felix Krause ff86083461 Fixes #44 2017-08-30 18:04:52 +02:00
flyx 26903d7e91 Fixes #42 2017-07-15 09:35:14 +02:00
Felix Krause 27d8eaeb35 Version 0.10.1 2017-07-10 20:42:49 +02:00
Felix Krause 0f2dba1a65 make tests green again; final fix for 0.17.0 2017-07-10 20:31:40 +02:00
Felix Krause 0caebe2618 Revert "Actual fix for #40" because it's shit
This reverts commit 15f8995ae2.
2017-07-10 19:52:34 +02:00
flyx bdbdcc074b fixed yaml.nimble to point to current version 2017-07-02 18:23:46 +02:00
Felix Krause 15f8995ae2 Actual fix for #40 2017-06-30 16:45:32 +02:00
Felix Krause 8a83272341 Version 0.10.0 2017-06-30 16:34:02 +02:00
flyx 0e679ead9c Merge pull request #41 from zah/fix-issue-40
fix #40 (compatibility with Nim 0.17.0)
2017-06-30 16:26:25 +02:00
Zahary Karadjov 7a122adad3 fix #40 2017-06-30 16:07:43 +03: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 71b075abf6 Allow backticked field names in macros 2017-03-29 18:38:31 +02:00
Felix Krause 24d68ad11d Version 0.9.1 2017-03-29 17:27:09 +02:00
Felix Krause a48bf086b7 Merge branch 'devel' of github.com:flyx/NimYAML into devel 2017-03-29 17:15:04 +02:00
Felix Krause f017a57d86 Made NimYAML compile for JS 2017-03-29 17:14:50 +02:00