modified: dyaml/constructor.d
modified: dyaml/dumper.d modified: dyaml/emitter.d modified: dyaml/exception.d modified: dyaml/node.d modified: dyaml/parser.d modified: dyaml/representer.d modified: dyaml/scanner.d modified: dyaml/zerostring.d
This commit is contained in:
parent
499ce02178
commit
1412466e93
|
@ -46,7 +46,7 @@ package class ConstructorException : YAMLException
|
|||
* end = End position of the error context.
|
||||
*/
|
||||
this(string msg, Mark start, Mark end, string file = __FILE__, int line = __LINE__)
|
||||
@safe nothrow
|
||||
@safe
|
||||
{
|
||||
super(msg ~ "\nstart: " ~ start.toString() ~ "\nend: " ~ end.toString(),
|
||||
file, line);
|
||||
|
|
|
@ -167,7 +167,7 @@ struct Dumper
|
|||
}
|
||||
|
||||
///Construct a Dumper writing to a _stream. This is useful to e.g. write to memory.
|
||||
this(Stream stream) pure @safe nothrow
|
||||
this(Stream stream) pure @safe
|
||||
{
|
||||
resolver_ = new Resolver();
|
||||
representer_ = new Representer();
|
||||
|
|
|
@ -166,7 +166,7 @@ struct Emitter
|
|||
* lineBreak = Line break character/s.
|
||||
*/
|
||||
this(Stream stream, const bool canonical, const int indent, const int width,
|
||||
const LineBreak lineBreak) @trusted nothrow
|
||||
const LineBreak lineBreak) @trusted
|
||||
in{assert(stream.writeable, "Can't emit YAML to a non-writable stream");}
|
||||
body
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ abstract class MarkedYAMLException : YAMLException
|
|||
{
|
||||
//Construct a MarkedYAMLException with specified context and problem.
|
||||
this(string context, Mark contextMark, string problem, Mark problemMark,
|
||||
string file = __FILE__, int line = __LINE__) @safe nothrow
|
||||
string file = __FILE__, int line = __LINE__) @safe
|
||||
{
|
||||
const msg = context ~ '\n' ~
|
||||
(contextMark != problemMark ? contextMark.toString() ~ '\n' : "") ~
|
||||
|
@ -68,7 +68,7 @@ abstract class MarkedYAMLException : YAMLException
|
|||
|
||||
//Construct a MarkedYAMLException with specified problem.
|
||||
this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__)
|
||||
@safe nothrow
|
||||
@safe
|
||||
{
|
||||
super(problem ~ '\n' ~ problemMark.toString(), file, line);
|
||||
}
|
||||
|
@ -89,14 +89,14 @@ template MarkedExceptionCtors()
|
|||
{
|
||||
public:
|
||||
this(string context, Mark contextMark, string problem, Mark problemMark,
|
||||
string file = __FILE__, int line = __LINE__) @safe nothrow
|
||||
string file = __FILE__, int line = __LINE__) @safe
|
||||
{
|
||||
super(context, contextMark, problem, problemMark,
|
||||
file, line);
|
||||
}
|
||||
|
||||
this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__)
|
||||
@safe nothrow
|
||||
@safe
|
||||
{
|
||||
super(problem, problemMark, file, line);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class NodeException : YAMLException
|
|||
* start = Start position of the node.
|
||||
*/
|
||||
this(string msg, Mark start, string file = __FILE__, int line = __LINE__)
|
||||
@safe nothrow
|
||||
@safe
|
||||
{
|
||||
super(msg ~ "\nNode at: " ~ start.toString(), file, line);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ struct Node
|
|||
@disable int opCmp(ref Pair);
|
||||
|
||||
///Construct a Pair from two values. Will be converted to Nodes if needed.
|
||||
this(K, V)(K key, V value) @safe
|
||||
this(K, V)(K key, V value) @trusted
|
||||
{
|
||||
static if(is(Unqual!K == Node)){this.key = key;}
|
||||
else {this.key = Node(key);}
|
||||
|
@ -1742,7 +1742,7 @@ package:
|
|||
* Params: pairs = Array of pairs to merge into.
|
||||
* toMerge = Pair to merge.
|
||||
*/
|
||||
void merge(ref Node.Pair[] pairs, ref Node.Pair toMerge) @safe
|
||||
void merge(ref Node.Pair[] pairs, Node.Pair toMerge) @safe
|
||||
{
|
||||
foreach(ref pair; pairs)
|
||||
{
|
||||
|
@ -1760,7 +1760,7 @@ void merge(ref Node.Pair[] pairs, ref Node.Pair toMerge) @safe
|
|||
* Params: pairs = Array of pairs to merge into.
|
||||
* toMerge = Pairs to merge.
|
||||
*/
|
||||
void merge(ref Node.Pair[] pairs, Node.Pair[] toMerge) @safe
|
||||
void merge(ref Node.Pair[] pairs, Node.Pair[] toMerge) @trusted
|
||||
{
|
||||
bool eq(ref Node.Pair a, ref Node.Pair b){return a.key == b.key;}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ final class Parser
|
|||
|
||||
public:
|
||||
///Construct a Parser using specified Scanner.
|
||||
this(Scanner scanner) @trusted nothrow
|
||||
this(Scanner scanner) @trusted
|
||||
{
|
||||
state_ = &parseStreamStart;
|
||||
scanner_ = scanner;
|
||||
|
|
|
@ -523,7 +523,7 @@ Node representSysTime(ref Node node, Representer representer) @system
|
|||
}
|
||||
|
||||
///Represent a sequence _node as sequence/set.
|
||||
Node representNodes(ref Node node, Representer representer) @safe
|
||||
Node representNodes(ref Node node, Representer representer) @trusted
|
||||
{
|
||||
auto nodes = node.as!(Node[]);
|
||||
if(node.tag_ == Tag("tag:yaml.org,2002:set"))
|
||||
|
|
|
@ -152,7 +152,7 @@ final class Scanner
|
|||
|
||||
public:
|
||||
///Construct a Scanner using specified Reader.
|
||||
this(Reader reader) @trusted nothrow
|
||||
this(Reader reader) @trusted
|
||||
{
|
||||
//Return the next token, but do not delete it from the queue
|
||||
reader_ = reader;
|
||||
|
|
|
@ -44,7 +44,7 @@ struct ZeroString(string TypeName)
|
|||
}
|
||||
|
||||
///Test for equality with another string.
|
||||
bool opEquals(const ref ZeroString str) const nothrow @trusted
|
||||
bool opEquals(const ZeroString str) const nothrow @trusted
|
||||
{
|
||||
return isNull ? str.isNull :
|
||||
str.isNull ? false : (0 == strcmp(str_, str.str_));
|
||||
|
|
Loading…
Reference in a new issue