DUB forced property fix.
This commit is contained in:
parent
f1438ec0d3
commit
2e3c6fe445
21
package.json
21
package.json
|
@ -1,9 +1,16 @@
|
|||
{
|
||||
"name": "dyaml",
|
||||
"description": "YAML parser and emitter",
|
||||
"homepage": "http://dyaml.alwaysdata.net/",
|
||||
"copyright": "Copyright © 2011, Ferdinand Majerech",
|
||||
"authors": ["Ferdinand Majerech"],
|
||||
"license": "Boost 1.0",
|
||||
"dependencies": {}
|
||||
"description": "YAML parser and emitter",
|
||||
"authors": [
|
||||
"Ferdinand Majerech"
|
||||
],
|
||||
"libs": [],
|
||||
"targetType": "staticLibrary",
|
||||
"importPaths": ["source"],
|
||||
"version": "~master",
|
||||
"license": "Boost 1.0",
|
||||
"dependencies": {},
|
||||
"homepage": "http://dyaml.alwaysdata.net/",
|
||||
"name": "dyaml",
|
||||
"copyright": "Copyright © 2011-2013, Ferdinand Majerech",
|
||||
"buildRequirements": ["relaxProperties"],
|
||||
}
|
||||
|
|
|
@ -376,7 +376,7 @@ final class Constructor
|
|||
}
|
||||
|
||||
//Get the array of constructor functions for scalar, sequence or mapping.
|
||||
auto delegates(T)() pure @safe nothrow
|
||||
@property auto delegates(T)() pure @safe nothrow
|
||||
{
|
||||
static if(is(T : string)) {return &fromScalar_;}
|
||||
else static if(is(T : Node[])) {return &fromSequence_;}
|
||||
|
|
|
@ -1554,7 +1554,7 @@ struct ScalarWriter
|
|||
|
||||
private:
|
||||
///Get next character and move end of the text range to it.
|
||||
dchar nextChar() pure @safe
|
||||
@property dchar nextChar() pure @safe
|
||||
{
|
||||
++endChar_;
|
||||
endByte_ = nextEndByte_;
|
||||
|
@ -1570,14 +1570,14 @@ struct ScalarWriter
|
|||
}
|
||||
|
||||
///Get character at start of the text range.
|
||||
dchar charAtStart() const pure @safe
|
||||
@property dchar charAtStart() const pure @safe
|
||||
{
|
||||
size_t idx = startByte_;
|
||||
return decode(text_, idx);
|
||||
}
|
||||
|
||||
///Is the current line too wide?
|
||||
bool tooWide() const pure @safe nothrow
|
||||
@property bool tooWide() const pure @safe nothrow
|
||||
{
|
||||
return startChar_ + 1 == endChar_ &&
|
||||
emitter_.column_ > emitter_.bestWidth_;
|
||||
|
|
|
@ -581,7 +581,7 @@ struct Node
|
|||
{
|
||||
return (cast(YAMLContainer!T)object).value_;
|
||||
}
|
||||
throw new Error("Node stores unexpected type: " ~ object.type.toString ~
|
||||
throw new Error("Node stores unexpected type: " ~ object.type.toString() ~
|
||||
". Expected: " ~ typeid(T).toString, startMark_);
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,7 @@ struct Node
|
|||
static if(!stringConversion)
|
||||
{
|
||||
if(isString){return to!T(value_.get!string);}
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString ~
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString() ~
|
||||
". Expected: " ~ typeid(T).toString, startMark_);
|
||||
}
|
||||
else
|
||||
|
@ -622,12 +622,12 @@ struct Node
|
|||
{
|
||||
const temp = value_.get!(const long);
|
||||
enforce(temp >= T.min && temp <= T.max,
|
||||
new Error("Integer value of type " ~ typeid(T).toString ~
|
||||
new Error("Integer value of type " ~ typeid(T).toString() ~
|
||||
" out of range. Value: " ~ to!string(temp), startMark_));
|
||||
return to!T(temp);
|
||||
}
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString ~
|
||||
". Expected: " ~ typeid(T).toString, startMark_);
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString() ~
|
||||
". Expected: " ~ typeid(T).toString(), startMark_);
|
||||
}
|
||||
assert(false, "This code should never be reached");
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ struct Node
|
|||
{
|
||||
return (cast(const YAMLContainer!(Unqual!T))object).value_;
|
||||
}
|
||||
throw new Error("Node has unexpected type: " ~ object.type.toString ~
|
||||
throw new Error("Node has unexpected type: " ~ object.type.toString() ~
|
||||
". Expected: " ~ typeid(T).toString, startMark_);
|
||||
}
|
||||
|
||||
|
@ -664,8 +664,8 @@ struct Node
|
|||
static if(!stringConversion)
|
||||
{
|
||||
if(isString){return to!T(value_.get!(const string));}
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString ~
|
||||
". Expected: " ~ typeid(T).toString, startMark_);
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString() ~
|
||||
". Expected: " ~ typeid(T).toString(), startMark_);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -693,11 +693,11 @@ struct Node
|
|||
{
|
||||
const temp = value_.get!(const long);
|
||||
enforce(temp >= T.min && temp <= T.max,
|
||||
new Error("Integer value of type " ~ typeid(T).toString ~
|
||||
new Error("Integer value of type " ~ typeid(T).toString() ~
|
||||
" out of range. Value: " ~ to!string(temp), startMark_));
|
||||
return to!T(temp);
|
||||
}
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString ~
|
||||
throw new Error("Node stores unexpected type: " ~ type.toString() ~
|
||||
". Expected: " ~ typeid(T).toString, startMark_);
|
||||
}
|
||||
}
|
||||
|
@ -1536,7 +1536,7 @@ struct Node
|
|||
{
|
||||
return value_.get!(const YAMLObject).cmp(rhs.value_.get!(const YAMLObject));
|
||||
}
|
||||
assert(false, "Unknown type of node for comparison : " ~ type.toString);
|
||||
assert(false, "Unknown type of node for comparison : " ~ type.toString());
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1576,7 +1576,7 @@ struct Node
|
|||
if(isScalar)
|
||||
{
|
||||
return indent ~ "scalar(" ~
|
||||
(convertsTo!string ? get!string : type.toString) ~ ")\n";
|
||||
(convertsTo!string ? get!string : type.toString()) ~ ")\n";
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
@ -1626,7 +1626,7 @@ struct Node
|
|||
}
|
||||
|
||||
//Determine if the value can be converted to specified type.
|
||||
bool convertsTo(T)() const @safe
|
||||
@property bool convertsTo(T)() const @safe
|
||||
{
|
||||
if(isType!T){return true;}
|
||||
|
||||
|
|
|
@ -710,7 +710,7 @@ final class Parser
|
|||
}
|
||||
else
|
||||
{
|
||||
immutable token = scanner_.peekToken;
|
||||
immutable token = scanner_.peekToken();
|
||||
throw new Error("While parsing a flow sequence", marks_.back,
|
||||
"expected ',' or ']', but got: " ~
|
||||
token.idString, token.startMark);
|
||||
|
@ -818,7 +818,7 @@ final class Parser
|
|||
}
|
||||
else
|
||||
{
|
||||
immutable token = scanner_.peekToken;
|
||||
immutable token = scanner_.peekToken();
|
||||
throw new Error("While parsing a flow mapping", marks_.back,
|
||||
"expected ',' or '}', but got: " ~
|
||||
token.idString, token.startMark);
|
||||
|
|
|
@ -509,7 +509,7 @@ Node representReal(ref Node node, Representer representer) @system
|
|||
string value = isNaN(f) ? ".nan":
|
||||
f == real.infinity ? ".inf":
|
||||
f == -1.0 * real.infinity ? "-.inf":
|
||||
{auto a = appender!string;
|
||||
{auto a = appender!string();
|
||||
formattedWrite(a, "%12f", f);
|
||||
return a.data.strip();}();
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ final class Scanner
|
|||
|
||||
private:
|
||||
///Determine whether or not we need to fetch more tokens before peeking/getting a token.
|
||||
bool needMoreTokens() pure @safe
|
||||
@property bool needMoreTokens() pure @safe
|
||||
{
|
||||
if(done_) {return false;}
|
||||
if(tokens_.empty){return true;}
|
||||
|
@ -1188,7 +1188,7 @@ final class Scanner
|
|||
void scanBlockScalarIgnoredLine(const Mark startMark) @trusted
|
||||
{
|
||||
findNextNonSpace();
|
||||
if(reader_.peek == '#'){scanToNextBreak();}
|
||||
if(reader_.peek()== '#'){scanToNextBreak();}
|
||||
|
||||
enforce("\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek()),
|
||||
new Error("While scanning a block scalar", startMark,
|
||||
|
|
|
@ -162,7 +162,7 @@ struct Serializer
|
|||
Anchor generateAnchor() @trusted
|
||||
{
|
||||
++lastAnchorID_;
|
||||
auto appender = appender!string;
|
||||
auto appender = appender!string();
|
||||
formattedWrite(appender, "id%03d", lastAnchorID_);
|
||||
return Anchor(appender.data);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue