@@ -254,7 +254,7 @@ $(GNAME ElseStatement):
254
254
$(PSSCOPE)
255
255
)
256
256
257
- $(P $(EXPRESSION) is evaluated and must have a type that
257
+ $(P *Expression* is evaluated and must have a type that
258
258
can be converted to a boolean. If it's `true` the
259
259
$(I ThenStatement) is transferred to, else the $(I ElseStatement)
260
260
is transferred to.)
@@ -265,19 +265,19 @@ $(GNAME ElseStatement):
265
265
$(P If an $(D auto) $(I Identifier) is provided, it is declared and
266
266
initialized
267
267
to the value
268
- and type of the $(EXPRESSION) . Its scope extends from when it is
268
+ and type of the *Expression* . Its scope extends from when it is
269
269
initialized to the end of the $(I ThenStatement).)
270
270
271
271
$(P If a $(I TypeCtors) $(I Identifier) is provided, it is declared
272
272
to be of the type specified by $(I TypeCtors)
273
- and is initialized with the value of the $(EXPRESSION) .
273
+ and is initialized with the value of the *Expression* .
274
274
Its scope extends from when it is
275
275
initialized to the end of the $(I ThenStatement).)
276
276
277
277
$(P If a $(I Declarator) is provided, it is declared and
278
278
initialized
279
279
to the value
280
- of the $(EXPRESSION) . Its scope extends from when it is
280
+ of the *Expression* . Its scope extends from when it is
281
281
initialized to the end of the $(I ThenStatement).)
282
282
283
283
---
@@ -374,7 +374,7 @@ $(GNAME ForStatement):
374
374
375
375
$(GNAME Initialize):
376
376
$(D ;)
377
- $(PS0 )
377
+ $(GLINK NoScopeNonEmptyStatement )
378
378
379
379
$(GNAME Test):
380
380
$(EXPRESSION)
@@ -452,7 +452,7 @@ $(GNAME AggregateForeach):
452
452
$(GLINK Foreach) $(D $(LPAREN)) $(GLINK ForeachTypeList) $(D ;) $(GLINK ForeachAggregate) $(D $(RPAREN))
453
453
454
454
$(GNAME ForeachStatement):
455
- $(GLINK AggregateForeach) $(PS0 )
455
+ $(GLINK AggregateForeach) $(GLINK NoScopeNonEmptyStatement )
456
456
457
457
$(GNAME Foreach):
458
458
$(D foreach)
@@ -1144,7 +1144,7 @@ $(GNAME StatementNoCaseNoDefault):
1144
1144
$(P The case expressions must all evaluate to a constant value or array,
1145
1145
or a runtime initialized const or immutable variable of integral type.
1146
1146
They must be implicitly convertible to the type of the switch
1147
- $(EXPRESSION) . )
1147
+ *Expression* . )
1148
1148
1149
1149
$(P Case expressions must all evaluate to distinct values. Const or
1150
1150
immutable variables must all have different names. If they share a
@@ -1253,13 +1253,13 @@ $(GNAME FinalSwitchStatement):
1253
1253
$(UL
1254
1254
$(LI No $(GLINK DefaultStatement) is allowed.)
1255
1255
$(LI No $(GLINK CaseRangeStatement)s are allowed.)
1256
- $(LI If the switch $(EXPRESSION) is of enum type, all
1256
+ $(LI If the switch *Expression* is of enum type, all
1257
1257
the enum members must appear in the $(GLINK CaseStatement)s.)
1258
1258
$(LI The case expressions cannot evaluate to a run time
1259
1259
initialized value.)
1260
1260
)
1261
1261
1262
- $(IMPLEMENTATION_DEFINED If the $(EXPRESSION) value does not match any
1262
+ $(IMPLEMENTATION_DEFINED If the *Expression* value does not match any
1263
1263
of the $(I CaseRangeStatements), whether that is diagnosed at compile
1264
1264
time or at runtime.)
1265
1265
@@ -1336,19 +1336,19 @@ $(GNAME ReturnStatement):
1336
1336
1337
1337
$(P `return` exits the current function and supplies its return value.)
1338
1338
1339
- $(P $(EXPRESSION) is required if the function specifies a return type that is
1340
- not void. The $(EXPRESSION) is implicitly converted to the function return
1339
+ $(P *Expression* is required if the function specifies a return type that is
1340
+ not void. The *Expression* is implicitly converted to the function return
1341
1341
type.)
1342
1342
1343
1343
$(P At least one return statement, throw statement, or assert(0) expression
1344
1344
is required if the function specifies a return type that is not void,
1345
1345
unless the function contains inline assembler code.)
1346
1346
1347
1347
$(COMMENT
1348
- $(EXPRESSION) is allowed even if the function specifies
1349
- a $(D_KEYWORD void) return type. The $(EXPRESSION) will be evaluated,
1348
+ *Expression* is allowed even if the function specifies
1349
+ a $(D_KEYWORD void) return type. The *Expression* will be evaluated,
1350
1350
but nothing will be returned.
1351
- If the $(EXPRESSION) has no side effects, and the return
1351
+ If the *Expression* has no side effects, and the return
1352
1352
type is $(D_KEYWORD void), then it is illegal.
1353
1353
)
1354
1354
$(P Before the function actually returns,
@@ -1365,7 +1365,7 @@ $(COMMENT
1365
1365
$(P If there is an out postcondition
1366
1366
(see $(DDLINK spec/contracts, Contract Programming, Contract Programming)),
1367
1367
that postcondition is executed
1368
- after the $(EXPRESSION) is evaluated and before the function
1368
+ after the *Expression* is evaluated and before the function
1369
1369
actually returns.)
1370
1370
1371
1371
---
@@ -1402,10 +1402,10 @@ DefaultStatement) of an enclosing $(GLINK SwitchStatement).)
1402
1402
next $(GLINK CaseStatement) of the innermost enclosing
1403
1403
$(GLINK SwitchStatement).)
1404
1404
1405
- $(P The fourth form, $(CODE goto case) $(EXPRESSION) $(D ;), transfers to the
1405
+ $(P The fourth form, $(CODE goto case) *Expression* $(D ;), transfers to the
1406
1406
$(GLINK CaseStatement) of the innermost enclosing
1407
1407
$(GLINK SwitchStatement)
1408
- with a matching $(EXPRESSION) .)
1408
+ with a matching *Expression* .)
1409
1409
1410
1410
---
1411
1411
switch (x)
@@ -1440,7 +1440,7 @@ $(GNAME WithStatement):
1440
1440
$(D with) $(D $(LPAREN)) $(GLINK2 template, TemplateInstance) $(D $(RPAREN)) $(PSSCOPE)
1441
1441
)
1442
1442
1443
- where $(EXPRESSION) evaluates to a class reference or struct
1443
+ where *Expression* evaluates to a class reference or struct
1444
1444
instance.
1445
1445
Within the with body the referenced object is searched first for
1446
1446
identifier symbols.
@@ -1466,7 +1466,7 @@ with (expression)
1466
1466
}
1467
1467
--------------
1468
1468
1469
- $(P Note that $(EXPRESSION) only gets evaluated once and is not copied.
1469
+ $(P Note that *Expression* only gets evaluated once and is not copied.
1470
1470
The with statement does not change what $(D this) or
1471
1471
$(D super) refer to.
1472
1472
)
@@ -1594,13 +1594,13 @@ $(GNAME SynchronizedStatement):
1594
1594
$(I ScopeStatement) by using a mutex.
1595
1595
)
1596
1596
1597
- $(P What mutex is used is determined by the $(EXPRESSION) .
1598
- If there is no $(EXPRESSION) , then a global mutex is created,
1597
+ $(P What mutex is used is determined by the *Expression* .
1598
+ If there is no *Expression* , then a global mutex is created,
1599
1599
one per such synchronized statement.
1600
1600
Different synchronized statements will have different global mutexes.
1601
1601
)
1602
1602
1603
- $(P If there is an $(EXPRESSION) , it must evaluate to either an
1603
+ $(P If there is an *Expression* , it must evaluate to either an
1604
1604
Object or an instance of an $(I Interface), in which case it
1605
1605
is cast to the Object instance that implemented that $(I Interface).
1606
1606
The mutex used is specific to that Object instance, and
@@ -1642,13 +1642,13 @@ $(GNAME Catches):
1642
1642
$(GLINK Catch) $(GSELF Catches)
1643
1643
1644
1644
$(GNAME Catch):
1645
- $(D catch $(LPAREN)) $(GLINK CatchParameter) $(D $(RPAREN)) $(PS0 )
1645
+ $(D catch $(LPAREN)) $(GLINK CatchParameter) $(D $(RPAREN)) $(GLINK NoScopeNonEmptyStatement )
1646
1646
1647
1647
$(GNAME CatchParameter):
1648
1648
$(GLINK2 type, BasicType) $(GLINK_LEX Identifier)$(OPT)
1649
1649
1650
1650
$(GNAME FinallyStatement):
1651
- $(D finally) $(PS0 )
1651
+ $(D finally) $(GLINK NoScopeNonEmptyStatement )
1652
1652
)
1653
1653
1654
1654
$(P $(I CatchParameter) declares a variable v of type T, where T is
@@ -1742,7 +1742,7 @@ $(GNAME ThrowStatement):
1742
1742
$(D throw) $(EXPRESSION) $(D ;)
1743
1743
)
1744
1744
1745
- $(P $(EXPRESSION) is evaluated and must be a `Throwable` reference. The
1745
+ $(P *Expression* is evaluated and must be a `Throwable` reference. The
1746
1746
`Throwable` reference is thrown as an exception.)
1747
1747
1748
1748
---
@@ -1758,17 +1758,17 @@ $(H2 $(LEGACY_LNAME2 ScopeGuardStatement, scope-guard-statement, Scope Guard Sta
1758
1758
1759
1759
$(GRAMMAR
1760
1760
$(GNAME ScopeGuardStatement):
1761
- $(D scope ( exit )) $(PSCURLYSCOPE )
1762
- $(D scope ( success )) $(PSCURLYSCOPE )
1763
- $(D scope ( failure )) $(PSCURLYSCOPE )
1761
+ $(D scope ( exit )) $(GLINK NonEmptyOrScopeBlockStatement )
1762
+ $(D scope ( success )) $(GLINK NonEmptyOrScopeBlockStatement )
1763
+ $(D scope ( failure )) $(GLINK NonEmptyOrScopeBlockStatement )
1764
1764
)
1765
1765
1766
- $(P The $(I ScopeGuardStatement) executes $(PSCURLYSCOPE) at the close of the
1766
+ $(P The $(I ScopeGuardStatement) executes *NonEmptyOrScopeBlockStatement* at the close of the
1767
1767
current scope, rather than at the point where the $(I ScopeGuardStatement)
1768
- appears. $(D scope(exit)) executes $(PSCURLYSCOPE) when the scope exits normally
1768
+ appears. $(D scope(exit)) executes *NonEmptyOrScopeBlockStatement* when the scope exits normally
1769
1769
or when it exits due to exception unwinding. $(D scope(failure)) executes
1770
- $(PSCURLYSCOPE) when the scope exits due to exception unwinding.
1771
- `scope(success)` executes $(PSCURLYSCOPE) when the scope exits normally.)
1770
+ *NonEmptyOrScopeBlockStatement* when the scope exits due to exception unwinding.
1771
+ `scope(success)` executes *NonEmptyOrScopeBlockStatement* when the scope exits normally.)
1772
1772
1773
1773
$(P If there are multiple $(I ScopeGuardStatement)s in a scope, they
1774
1774
will be executed in the reverse lexical order in which they appear.
@@ -1995,10 +1995,5 @@ Macros:
1995
1995
EXPRESSION=$(GLINK2 expression, Expression)
1996
1996
PSSEMI_PSCURLYSCOPE=$(GLINK Statement)
1997
1997
PSSEMI_PSCURLYSCOPE_LIST=$(GLINK ScopeStatementList)
1998
- PS0=$(GLINK NoScopeNonEmptyStatement)
1999
1998
PSSCOPE=$(GLINK ScopeStatement)
2000
- PSCURLY=$(GLINK BlockStatement)
2001
- PSSEMI=$(GLINK NoScopeStatement)
2002
- PSCURLY_PSSCOPE=$(GLINK ScopeBlockStatement)
2003
- PSCURLYSCOPE=$(GLINK NonEmptyOrScopeBlockStatement)
2004
1999
_=
0 commit comments