Skip to content

Commit ec4edb7

Browse files
Geod24PetarKirov
authored andcommitted
Clear up 'body' deprecations
1 parent 68ca041 commit ec4edb7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

source/stdx/data/json/lexer.d

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ struct JSONLexerRange(Input, LexOptions options = LexOptions.init, String = stri
907907
{
908908
assert(!kind.among!(Kind.string, Kind.boolean, Kind.number));
909909
}
910-
body
910+
do
911911
{
912912
_kind = kind;
913913
}
@@ -937,12 +937,12 @@ struct JSONLexerRange(Input, LexOptions options = LexOptions.init, String = stri
937937
/// ditto
938938
@property Kind kind(Kind value) nothrow @nogc
939939
in { assert(!value.among!(Kind.boolean, Kind.number, Kind.string)); }
940-
body { return _kind = value; }
940+
do { return _kind = value; }
941941

942942
/// Gets/sets the boolean value of the token.
943943
@property bool boolean() const pure nothrow @trusted @nogc
944944
in { assert(_kind == Kind.boolean, "Token is not a boolean."); }
945-
body { return _boolean; }
945+
do { return _boolean; }
946946
/// ditto
947947
@property bool boolean(bool value) pure nothrow @nogc
948948
{
@@ -954,7 +954,7 @@ struct JSONLexerRange(Input, LexOptions options = LexOptions.init, String = stri
954954
/// Gets/sets the numeric value of the token.
955955
@property JSONNumber number() const pure nothrow @trusted @nogc
956956
in { assert(_kind == Kind.number, "Token is not a number."); }
957-
body { return _number; }
957+
do { return _number; }
958958
/// ditto
959959
@property JSONNumber number(JSONNumber value) nothrow @nogc
960960
{
@@ -972,7 +972,7 @@ struct JSONLexerRange(Input, LexOptions options = LexOptions.init, String = stri
972972
/// Gets/sets the string value of the token.
973973
@property const(JSONString!String) string() const pure nothrow @trusted @nogc
974974
in { assert(_kind == Kind.string, "Token is not a string."); }
975-
body { return _kind == Kind.string ? _string : JSONString!String.init; }
975+
do { return _kind == Kind.string ? _string : JSONString!String.init; }
976976
/// ditto
977977
@property JSONString!String string(JSONString!String value) pure nothrow @nogc
978978
{

source/stdx/data/json/parser.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ struct JSONParserNode(String)
679679
/// ditto
680680
@property Kind kind(Kind value) nothrow
681681
in { assert(!value.among(Kind.key, Kind.literal)); }
682-
body { return _kind = value; }
682+
do { return _kind = value; }
683683

684684
/**
685685
* The key identifier for $(D Kind.key) nodes.
@@ -868,7 +868,7 @@ void skipValue(R)(ref R nodes) if (isJSONParserNodeInputRange!R)
868868

869869
assert(j.front.kind == JSONParserNodeKind.arrayStart);
870870
j.popFront();
871-
871+
872872
// skips the whole [1, 2, 3] array
873873
j.skipValue();
874874

0 commit comments

Comments
 (0)