Skip to content

Commit fe4e84f

Browse files
authored
Merge pull request #3475 from MrcSnm/patch-2
Remove version(integer) from docs Signed-off-by: Dennis <dkorpel@users.noreply.github.com> Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>
2 parents f5e089e + c8ba0f1 commit fe4e84f

File tree

1 file changed

+11
-26
lines changed

1 file changed

+11
-26
lines changed

spec/version.dd

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ $(H2 $(LNAME2 version, Version Condition))
5858

5959
$(GRAMMAR
6060
$(GNAME VersionCondition):
61-
$(D version $(LPAREN)) $(GLINK_LEX IntegerLiteral) $(D $(RPAREN))
6261
$(D version $(LPAREN)) $(GLINK_LEX Identifier) $(D $(RPAREN))
6362
$(D version $(LPAREN)) $(D unittest) $(D $(RPAREN))
6463
$(D version $(LPAREN)) $(D assert) $(D $(RPAREN))
@@ -68,15 +67,14 @@ $(GNAME VersionCondition):
6867
with a single source file.
6968
)
7069

71-
$(P The $(I VersionCondition) is satisfied if the $(I IntegerLiteral)
72-
is greater than or equal to the current $(I version level),
73-
or if $(I Identifier) matches a $(I version identifier).
70+
$(P The $(I VersionCondition) is satisfied if $(I Identifier)
71+
matches a $(I version identifier).
7472
)
7573

76-
$(P The $(I version level) and $(I version identifier) can
77-
be set on the command line by the $(D -version) switch
78-
or in the module itself with a $(GLINK VersionSpecification),
79-
or they can be predefined by the compiler.
74+
$(P The $(I version identifier) can be set on the command line
75+
by the $(D -version) switch or in the module itself with a
76+
$(GLINK VersionSpecification), or they can be predefined
77+
by the compiler.
8078
)
8179

8280
$(P Version identifiers are in their own unique name space, they do
@@ -118,7 +116,6 @@ $(H2 $(LEGACY_LNAME2 VersionSpecification, version-specification, Version Specif
118116
$(GRAMMAR
119117
$(GNAME VersionSpecification):
120118
$(D version =) $(GLINK_LEX Identifier) $(D ;)
121-
$(D version =) $(GLINK_LEX IntegerLiteral) $(D ;)
122119
)
123120

124121
$(P The version specification makes it straightforward to group
@@ -194,10 +191,6 @@ class Foo
194191
)
195192

196193
------
197-
version($(CODE_HIGHLIGHT n)) // add in version code if version level is >= n
198-
{
199-
... version code ...
200-
}
201194

202195
version($(CODE_HIGHLIGHT identifier)) // add in version code if version
203196
// keyword is identifier
@@ -206,8 +199,8 @@ version($(CODE_HIGHLIGHT identifier)) // add in version code if version
206199
}
207200
------
208201

209-
$(P These are presumably set by the command line as
210-
$(D -version=n) and $(D -version=identifier).
202+
$(P This is presumably set by the command line as
203+
$(D -version=identifier).
211204
)
212205

213206

@@ -414,7 +407,6 @@ $(H2 $(LNAME2 debug, Debug Condition))
414407
$(GRAMMAR
415408
$(GNAME DebugCondition):
416409
$(D debug)
417-
$(D debug $(LPAREN)) $(GLINK_LEX IntegerLiteral) $(D $(RPAREN))
418410
$(D debug $(LPAREN)) $(GLINK_LEX Identifier) $(D $(RPAREN))
419411
)
420412

@@ -429,12 +421,7 @@ $(GNAME DebugCondition):
429421
)
430422

431423
$(P The $(D debug) condition is satisfied when the $(D -debug) switch is
432-
passed to the compiler or when the debug level is >= 1.
433-
)
434-
435-
$(P The $(D debug $(LPAREN)) $(I IntegerLiteral) $(D $(RPAREN)) condition is satisfied
436-
when the debug
437-
level is $(D >=) $(I IntegerLiteral).
424+
passed to the compiler.
438425
)
439426

440427
$(P The $(D debug $(LPAREN)) $(I Identifier) $(D $(RPAREN)) condition is satisfied
@@ -473,10 +460,9 @@ $(H2 $(LNAME2 debug_specification, Debug Specification))
473460
$(GRAMMAR
474461
$(GNAME DebugSpecification):
475462
$(D debug =) $(GLINK_LEX Identifier) $(D ;)
476-
$(D debug =) $(GLINK_LEX IntegerLiteral) $(D ;)
477463
)
478464

479-
$(P Debug identifiers and levels are set either by the command line switch
465+
$(P Debug identifiers are set either by the command line switch
480466
$(D -debug) or by a $(I DebugSpecification).
481467
)
482468

@@ -501,12 +487,11 @@ debug = foo; // error, foo used before set
501487
)
502488

503489
------
504-
debug(IntegerLiteral) { } // add in debug code if debug level is >= IntegerLiteral
505490
debug(identifier) { } // add in debug code if debug keyword is identifier
506491
------
507492

508493
$(P These are presumably set by the command line as
509-
$(D -debug=)$(I n) and $(D -debug=)$(I identifier).
494+
and $(D -debug=)$(I identifier).
510495
)
511496

512497
$(H2 $(LNAME2 staticif, Static If Condition))

0 commit comments

Comments
 (0)