Commit graph

29 commits

Author SHA1 Message Date
Jonathan M Davis 7a1e1ecce3 Another attempt at making d-yaml work with dub.
Creating a symlink in source to the dyaml directory does not actually
result in a symlink when another package grabs d-yaml as a dependency
via dub, and even if it did, it wouldn't work on Windows. So, this moves
the source into source so that it'll actually work, and cdc.d has been
adjusted accordingly so that building with it should still work.
2013-03-28 21:33:13 -07:00
John-Colvin aedc2f0c7a parse can't take rvalue slices as it uses ref 2013-03-23 17:01:33 +00:00
Kiith-Sa 539f5837d6 Temporaries in constructor.d due to changes in ref passing (by John Colvin). 2012-12-27 22:10:29 +01:00
Kiith-Sa d6617f327f More nothrow/formatting fixes (by John Colvin). 2012-12-27 21:50:09 +01:00
Kiith-Sa 6018fc49ea @safe/nothrow changes (by John Colvin) 2012-12-27 20:56:15 +01:00
Kiith-Sa 4b3bf5fccc Minor formatting fixes. 2012-12-27 20:11:26 +01:00
kiith-sa c7e97b6113 User defined constructors now can construct all default types (e.g. float). 2012-09-22 22:45:37 +02:00
kiith-sa edf3e2a799 Using std.typecons.Flag where possible, and more in->const. 2012-09-14 01:21:01 +02:00
kiith-sa 4f78702a57 Added pure/@safe/nothrow where possible. 2012-09-09 01:42:13 +02:00
kiith-sa 37a661b034 Fixed compilation with DMD 2.058.
There are some hacks to allow toHash() methods
to be const nothrow @safe, these are due to
Phobos problems (e.g. Variant.toHash() is not const nor nothrow).
2012-08-30 15:38:51 +02:00
Ferdinand Majerech 5aacfe79b2 Improved an error message when there's no constructor for a tag. 2012-04-01 16:57:21 +02:00
Ferdinand Majerech ebc6e64c2b API BREAKING:
Node opEquals(), opIndex(), opIndexAssign(), remove(), removeAt()
no longer automatically convert to string. This was changed
to prevent the API from getting too non-obvious, and to
remove the need for too many special cases in the code.
The API documentation was changed accordingly.
opApply()  still automatically converts to string.

Added a contains() method to Node.

Clarified YAML null values in the documentation.

Improved unittests.

Fixed a bug that caused opIndex() and opIndexAssign() to only
work with exactly the same type as stored in the node
(e.g. real, but not double, for floating-point values)

Fixed some potential bugs.

Minor documentation fixes.
2012-03-01 11:44:05 +01:00
Ferdinand Majerech 9596806644 Red-Black Trees are now used for duplicate detection, and planned
to be used for unordered map storage. This is because AAs still
don't work correctly and even if they did, require the user to
define both toHash and opCmp/opEquals for every YAML
struct/class. Now only opCmp needs to be defined.
Documentation/tutorials/examples have been updated accordingly.
2012-01-23 15:57:26 +01:00
Stefan Hepp bb54e6db41 Fix for compile error with dmd 2.057 2012-01-19 17:51:42 +01:00
Ferdinand Majerech fbc962623d Simplified the Constructor API. 2011-11-17 23:53:24 +01:00
Ferdinand Majerech 5d35f44416 Nodes now remember their scalar and collection style, although
these are not accessible by the user (as the spec says).
This allows D:YAML to remember styles between loading and
dumping.
2011-10-27 23:13:14 +02:00
Ferdinand Majerech c787531497 Node struct enlarged to 40 bytes. There is no significant
slowdown and a slight memory usage increase. Fixed a potential
bug in Reader. Tag is now implemented as a zero-terminated
string, removing the need for global state.
Node opIndex now returns a reference.
2011-10-26 21:05:56 +02:00
Ferdinand Majerech 60b57ca00d Minor optimizations.
Queue now only adds ranges to the GC if the type allocated has
indirections.
2011-10-26 06:30:10 +02:00
Ferdinand Majerech 97693b4417 Got rid of most UTF-8 decoding that took a lot of time.
Removed unnecessary calls to Stream.available(),
again for grat speed gain. Also various small optimizations.
Overall, improved loading speed about 400%.
2011-10-24 00:46:35 +02:00
Ferdinand Majerech 13ea5f0c24 Added a shortcut alias called "as" for Node.get(), and replaced
get() with as() all over the code, tutorials, examples and docs.
Fixed a bug in YAML benchmark makefile.
Fixed a bug in autoddoc configuration.
2011-10-22 17:06:32 +02:00
Ferdinand Majerech 2cd2de44ff Updated Constructor API documentation with examples. 2011-10-18 21:40:37 +02:00
Ferdinand Majerech 8ad650e089 Cleaned up exceptions and their messages.
Some minor dog fixes.
2011-10-18 16:12:22 +02:00
Ferdinand Majerech 548480b06b Changed the Constructor API (for loading of custom types) to
make it easier to load custom classes/structs. Updated API docs,
tutorials and examples accordingly.
2011-10-17 12:53:38 +02:00
Ferdinand Majerech 8360da733d All YAML exceptions now keep track of file and line they've been
thrown at, making debugging easier.
2011-10-13 11:30:14 +02:00
Ferdinand Majerech 934df763ad Most of emitter work done. There are some more changes left until 0.2,
and the turorials and documentation still need some updating.
2011-10-11 15:58:23 +02:00
Ferdinand Majerech b0f2ce201a Added Node constructors needed to create new nodes to emit. 2011-08-21 03:56:21 +02:00
Ferdinand Majerech 2c230751d2 Added support for null tag structs (used in parsing), using
the Tag struct throughout the code. Event struct size decreased
to 48 bytes.
2011-08-21 00:07:32 +02:00
Ferdinand Majerech 7192503fe6 Implemented a Tag struct taking as little memory as possible.
Removed endMark from Node to keep it in 32 bytes on 64bit.
This will result in slightly worse debugging messages, but we
still have the start position of a node.

Tag is needed for better compliance with the spec and emitting
support for multiple tags with the same D data type.
2011-08-20 22:15:20 +02:00
Ferdinand Majerech 283c42bf8f Initial commit. 2011-08-16 14:53:13 +02:00