From d38c3d96bfb65832e3658b3ef25efa4fc56cb328 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Tue, 4 Feb 2020 11:28:21 +0900 Subject: [PATCH] Replace 'body' with 'do' The former is set to be deprecated in the next (2.091.0) DMD release. --- src/dfmt/formatter.d | 10 +++++----- src/dfmt/globmatch_editorconfig.d | 2 +- src/dfmt/tokens.d | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 49d8e18..354401d 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -565,7 +565,7 @@ private: { assert(currentIs(tok!"(") || currentIs(tok!"[")); } - body + do { immutable p = current.type; regenLineBreakHintsIfNecessary(index); @@ -650,7 +650,7 @@ private: { assert(currentIs(tok!")")); } - body + do { parenDepth--; indents.popWrapIndents(); @@ -685,7 +685,7 @@ private: { assert(currentIs(tok!"]")); } - body + do { indents.popWrapIndents(); if (indents.topIs(tok!"]")) @@ -1715,7 +1715,7 @@ private: { assert(currentIs(tok!"("), str(current.type)); } - body + do { immutable int depth = parenDepth; immutable int startingNiBraceDepth = niBraceDepth; @@ -1860,7 +1860,7 @@ const pure @safe @nogc: { assert(index < tokens.length); } - body + do { return tokens[index]; } diff --git a/src/dfmt/globmatch_editorconfig.d b/src/dfmt/globmatch_editorconfig.d index 016e2b9..eff1b79 100644 --- a/src/dfmt/globmatch_editorconfig.d +++ b/src/dfmt/globmatch_editorconfig.d @@ -23,7 +23,7 @@ in assert(balancedParens(pattern, '[', ']', 0)); assert(balancedParens(pattern, '{', '}', 0)); } -body +do { alias RC = Unqual!(ElementEncodingType!Range); diff --git a/src/dfmt/tokens.d b/src/dfmt/tokens.d index 551dc17..0271fde 100644 --- a/src/dfmt/tokens.d +++ b/src/dfmt/tokens.d @@ -15,7 +15,7 @@ in { assert(tokens[0].type == tok!"("); } -body +do { uint length = 0; size_t i = 1;