Skip to content

Commit 45eb428

Browse files
committed
Work around DDoc parsing errors on the newer STABLE_DMD.
1 parent 9e8bcd4 commit 45eb428

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

book/d.en/is_expr.d

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ The following function template uses different specifiers with this syntax of th
344344
---
345345
void myFunction(T)(T parameter) {
346346
static if (is (T LocalAlias == struct)) {
347-
writefln("\n--- struct ---");
347+
writefln("\n-- struct --");
348348
// LocalAlias is the same as T. 'parameter' is the
349349
// struct object that has been passed to this
350350
// function.
@@ -355,7 +355,7 @@ void myFunction(T)(T parameter) {
355355
}
356356
357357
static if (is (T baseTypes == super)) {
358-
writeln("\n--- super ---");
358+
writeln("\n-- super --");
359359
// The 'baseTypes' tuple contains all of the base
360360
// types of T. 'parameter' is the class variable that
361361
// has been passed to this function.
@@ -368,7 +368,7 @@ void myFunction(T)(T parameter) {
368368
}
369369
370370
static if (is (T ImplT == enum)) {
371-
writeln("\n--- enum ---");
371+
writeln("\n-- enum --");
372372
// 'ImplT' is the actual implementation type of this
373373
// enum type. 'parameter' is the enum value that has
374374
// been passed to this function.
@@ -378,7 +378,7 @@ void myFunction(T)(T parameter) {
378378
}
379379
380380
static if (is (T ReturnT == return)) {
381-
writeln("\n--- return ---");
381+
writeln("\n-- return --");
382382
// 'ReturnT' is the return type of the function
383383
// pointer that has been passed to this function.
384384
@@ -418,18 +418,18 @@ The output:
418418
)
419419

420420
$(SHELL_SMALL
421-
--- struct ---
421+
-- struct --
422422
Constructing a new Point object by copying it.
423423

424-
--- super ---
424+
-- super --
425425
class AlarmClock has 2 base types.
426426
All of the bases: (Object, Clock)
427427
The topmost base: Object
428428

429-
--- enum ---
429+
-- enum --
430430
The implementation type of enum WeekDays is int
431431

432-
--- return ---
432+
-- return --
433433
This is a function with a return type of char:
434434
char function(double d, int i, Clock c)
435435
calling it... and the result is 'a'
@@ -497,7 +497,7 @@ The following program tests that $(C is) expression with four different types:
497497
import std.stdio;
498498

499499
void myFunction(T)(T parameter) {
500-
writefln("\n--- Called with %s ---", T.stringof);
500+
writefln("\n-- Called with %s --", T.stringof);
501501

502502
static if (is (T == Value[Key],
503503
Value,
@@ -533,20 +533,20 @@ The condition is satisfied only if the key type is $(C string):
533533
)
534534

535535
$(SHELL_SMALL
536-
--- Called with int ---
536+
-- Called with int --
537537
No, the condition has not been satisfied.
538538

539-
--- Called with int[string] ---
539+
-- Called with int[string] --
540540
Yes, the condition has been satisfied.
541541
The value type: int
542542
The key type : string
543543

544-
--- Called with double[string] ---
544+
-- Called with double[string] --
545545
Yes, the condition has been satisfied.
546546
The value type: double
547547
The key type : string
548548

549-
--- Called with dchar[long] ---
549+
-- Called with dchar[long] --
550550
No, the condition has not been satisfied.
551551
)
552552

book/d.en/literals.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ To see this logic in action, let's try the following program that takes advantag
7878
import std.stdio;
7979
8080
void main() {
81-
writeln("\n--- these are written in decimal ---");
81+
writeln("\n-- these are written in decimal --");
8282
8383
// fits an int, so the type is int
8484
writeln( 2_147_483_647, "\t\t",
@@ -88,7 +88,7 @@ void main() {
8888
writeln( 2_147_483_648, "\t\t",
8989
typeof(2_147_483_648).stringof);
9090
91-
writeln("\n--- these are NOT written in decimal ---");
91+
writeln("\n-- these are NOT written in decimal --");
9292
9393
// fits an int, so the type is int
9494
writeln( 0x7FFF_FFFF, "\t\t",
@@ -113,11 +113,11 @@ The output:
113113
)
114114
115115
$(SHELL
116-
--- these are written in decimal ---
116+
-- these are written in decimal --
117117
2147483647 int
118118
2147483648 long
119119
120-
--- these are NOT written in decimal ---
120+
-- these are NOT written in decimal --
121121
2147483647 int
122122
2147483648 uint
123123
4294967296 long

book/d.en/switch_case.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ import std.stdio;
123123
124124
void main() {
125125
foreach (value; [ 1, 2, 3, 10, 20 ]) {
126-
writefln("--- value: %s ---", value);
126+
writefln("-- value: %s --", value);
127127
128128
switch (value) {
129129
@@ -156,19 +156,19 @@ The output:
156156
)
157157
158158
$(SHELL
159-
--- value: 1 ---
159+
-- value: 1 --
160160
case 1
161161
case 2
162162
case 10
163-
--- value: 2 ---
163+
-- value: 2 --
164164
case 2
165165
case 10
166-
--- value: 3 ---
166+
-- value: 3 --
167167
case 3
168168
default
169-
--- value: 10 ---
169+
-- value: 10 --
170170
case 10
171-
--- value: 20 ---
171+
-- value: 20 --
172172
default
173173
)
174174

0 commit comments

Comments
 (0)