diff --git a/book/dlang.org.ddoc b/book/dlang.org.ddoc index 9fb9cf513a..50b70b0fad 100644 --- a/book/dlang.org.ddoc +++ b/book/dlang.org.ddoc @@ -186,7 +186,7 @@ GNAME=$(SPANC gname, $0) GRAMMAR=$(TC pre, bnf notranslate, $0) GRAMMAR_INFORMATIVE=$(GRAMMAR $0) GRAMMAR_LEX=$(GRAMMAR $0) -GRAMMAR_INLINE=$(TC tt, bnf notranslate, $0) +GRAMMAR_INLINE=$(TC tt, bnf_inline notranslate, $0) GREEN=$(SPANC green, $0) GSELF=$(I $0) GT=> diff --git a/css/style.css b/css/style.css index 6d7796b688..4807cf2b2b 100644 --- a/css/style.css +++ b/css/style.css @@ -44,7 +44,7 @@ body, .d_decl .quickindex font-family: "Roboto Slab", sans-serif; } -pre, code, .tt, .d_inlinecode, td.param_id, .CodeMirror pre, .d_decl +pre, code, .tt, .d_inlinecode, .bnf_inline, td.param_id, .CodeMirror pre, .d_decl { font-family: Consolas, "Bitstream Vera Sans Mono", "Andale Mono", Monaco, "DejaVu Sans Mono", "Lucida Console", monospace; } @@ -1202,6 +1202,12 @@ body.dcompiler dt a.anchor:hover:before background-color: white; } +.bnf_inline +{ + font-size: small; + background-color: #F5F5F5; /* differentiate grammar from paragraph punctuation */ +} + .ddoccode { background-color: #f3eeee; diff --git a/dlang.org.ddoc b/dlang.org.ddoc index 3028e24405..9b3223c11d 100644 --- a/dlang.org.ddoc +++ b/dlang.org.ddoc @@ -189,7 +189,7 @@ $(COMMENT GRAMMAR invocations will appear in spec/grammar.html, but NOT the suff GRAMMAR=$(TC pre, bnf notranslate, $0) GRAMMAR_INFORMATIVE=$(GRAMMAR $0) GRAMMAR_LEX=$(GRAMMAR $0) -GRAMMAR_INLINE=$(TC tt, bnf notranslate, $0) +GRAMMAR_INLINE=$(TC tt, bnf_inline notranslate, $0) GREEN=$(SPANC green, $0) GSELF=$(I $0) GT=> diff --git a/spec/expression.dd b/spec/expression.dd index b3600db952..07d951b388 100644 --- a/spec/expression.dd +++ b/spec/expression.dd @@ -1911,7 +1911,7 @@ $(GNAME Slice): The special variable `$` is declared and set to be the number of elements in the $(I PostfixExpression) (when available). A new declaration scope is created for the evaluation of the - $(GRAMMAR_INLINE *AssignExpression* .. *AssignExpression*) and `$` appears in + $(GRAMMAR_INLINE *AssignExpression* `..` *AssignExpression*) and `$` appears in that scope only. ) diff --git a/spec/statement.dd b/spec/statement.dd index 5a19413c33..895b68f632 100644 --- a/spec/statement.dd +++ b/spec/statement.dd @@ -1808,16 +1808,15 @@ L1: --- ) -$(P The second form, $(CODE goto default;), transfers to the innermost $(GLINK +$(P The second form, $(GRAMMAR_INLINE `goto default`;), transfers to the innermost $(GLINK DefaultStatement) of an enclosing $(GLINK SwitchStatement).) - $(P The third form, $(CODE goto case;), transfers to the + $(P The third form, $(GRAMMAR_INLINE `goto case`;), transfers to the next $(GLINK CaseStatement) of the innermost enclosing $(GLINK SwitchStatement).) - $(P The fourth form, $(CODE goto case) *Expression*$(D ;), transfers to the - $(GLINK CaseStatement) of the innermost enclosing - $(GLINK SwitchStatement) + $(P The fourth form, $(GRAMMAR_INLINE `goto case` *Expression*;), transfers to the + $(GLINK CaseStatement) of the innermost enclosing $(GLINK SwitchStatement) with a matching *Expression*.) $(SPEC_RUNNABLE_EXAMPLE_RUN @@ -1842,7 +1841,7 @@ switch (x) --- ) -$(P Any intervening finally clauses are executed, along with releasing any +$(P Any intervening `finally` clauses are executed, along with releasing any intervening synchronization mutexes.) $(P It is illegal for a $(I GotoStatement) to be used to skip @@ -1850,7 +1849,7 @@ intervening synchronization mutexes.) $(BEST_PRACTICE Prefer using a higher-level control-flow construct or a labelled $(GLINK BreakStatement)/$(GLINK ContinueStatement) - rather than the $(GRAMMAR_INLINE *`goto` Identifier;*) form.) + rather than the $(GRAMMAR_INLINE `goto` *Identifier*;) form.) $(H2 $(LEGACY_LNAME2 WithStatement, with-statement, With Statement))