Skip to content

Commit 1baaa90

Browse files
authored
Merge pull request #14747 from dotty-staging/scaladoc/css-adjustments
Fix in syntax.md. CSS adjustments
2 parents 1c033a7 + a60c4e7 commit 1baaa90

33 files changed

+2057
-1740
lines changed

docs/_docs/internals/syntax-3.1.md

Lines changed: 163 additions & 163 deletions
Large diffs are not rendered by default.

docs/_docs/internals/syntax.md

Lines changed: 187 additions & 187 deletions
Large diffs are not rendered by default.

docs/_docs/reference/changed-features/imports.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ are offered under settings `-source 3.1-migration -rewrite`.
4646

4747
### Syntax
4848

49-
```
50-
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
51-
ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec
49+
```ebnf
50+
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr} ;
51+
ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec ;
5252
ImportSpec ::= NamedSelector
5353
| WildcardSelector
54-
| ‘{’ ImportSelectors) ‘}’
55-
NamedSelector ::= id [‘as’ (id | ‘_’)]
56-
WildCardSelector ::= ‘*' | ‘given’ [InfixType]
54+
| ‘{’ ImportSelectors) ‘}’ ;
55+
NamedSelector ::= id [‘as’ (id | ‘_’)] ;
56+
WildCardSelector ::= ‘*' | ‘given’ [InfixType] ;
5757
ImportSelectors ::= NamedSelector [‘,’ ImportSelectors]
58-
| WildCardSelector {‘,’ WildCardSelector}
58+
| WildCardSelector {‘,’ WildCardSelector} ;
5959
```

docs/_docs/reference/changed-features/match-syntax.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ The syntactical precedence of match expressions has been changed.
4747

4848
The new syntax of match expressions is as follows.
4949

50-
```
50+
```ebnf
5151
InfixExpr ::= ...
52-
| InfixExpr MatchClause
52+
| InfixExpr MatchClause ;
5353
SimpleExpr ::= ...
54-
| SimpleExpr ‘.’ MatchClause
55-
MatchClause ::= ‘match’ ‘{’ CaseClauses ‘}’
54+
| SimpleExpr ‘.’ MatchClause ;
55+
MatchClause ::=match’ ‘{’ CaseClauses ‘}’ ;
5656
```

docs/_docs/reference/changed-features/pattern-bindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ for case (x, y) <- elems yield (y, x) // returns List((2, 1), (4, 3))
5050
## Syntax Changes
5151

5252
Generators in for expressions may be prefixed with `case`.
53-
```
54-
Generator ::= [‘case’] Pattern1 ‘<-’ Expr
53+
```ebnf
54+
Generator ::= [‘case’] Pattern1 ‘<-’ Expr ;
5555
```
5656

5757
## Migration

docs/_docs/reference/changed-features/structural-types-spec.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/structura
66

77
## Syntax
88

9-
```
10-
SimpleType ::= ... | Refinement
11-
Refinement ::= ‘{’ RefineStatSeq ‘}’
12-
RefineStatSeq ::= RefineStat {semi RefineStat}
13-
RefineStat ::= ‘val’ VarDcl | ‘def’ DefDcl | ‘type’ {nl} TypeDcl
9+
```ebnf
10+
SimpleType ::= ... | Refinement ;
11+
Refinement ::= ‘{’ RefineStatSeq ‘}’ ;
12+
RefineStatSeq ::= RefineStat {semi RefineStat} ;
13+
RefineStat ::= ‘val’ VarDcl | ‘def’ DefDcl | ‘type’ {nl} TypeDcl ;
1414
```
1515

1616
## Implementation of Structural Types

docs/_docs/reference/changed-features/vararg-splices.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ The old syntax for splice arguments will be phased out.
2424

2525
## Syntax
2626

27-
```
27+
```ebnf
2828
ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
29-
| ‘(’ [Patterns ‘,’] Pattern2 ‘*’ ‘)’
29+
| ‘(’ [Patterns ‘,’] Pattern2 ‘*’ ‘)’ ;
3030
3131
ParArgumentExprs ::= ‘(’ [‘using’] ExprsInParens ‘)’
32-
| ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘*’ ‘)’
32+
| ‘(’ [ExprsInParens ‘,’] PostfixExpr ‘*’ ‘)’ ;
3333
```
3434

3535
## Compatibility considerations

docs/_docs/reference/contextual/context-bounds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ done automatically under `-rewrite`.
4040

4141
## Syntax
4242

43-
```
44-
TypeParamBounds ::= [SubtypeBounds] {ContextBound}
45-
ContextBound ::= ‘:’ Type
43+
```ebnf
44+
TypeParamBounds ::= [SubtypeBounds] {ContextBound} ;
45+
ContextBound ::= ‘:’ Type ;
4646
```

docs/_docs/reference/contextual/context-functions-spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ movedTo: https://docs.scala-lang.org/scala3/reference/contextual/context-functio
66

77
## Syntax
88

9-
```
9+
```ebnf
1010
Type ::= ...
11-
| FunArgTypes ‘?=>’ Type
11+
| FunArgTypes ‘?=>’ Type ;
1212
Expr ::= ...
13-
| FunParams ‘?=>’ Expr
13+
| FunParams ‘?=>’ Expr ;
1414
```
1515

1616
Context function types associate to the right, e.g.

docs/_docs/reference/contextual/derivation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,12 @@ hand side of this definition in the same way as an instance defined in ADT compa
354354

355355
### Syntax
356356

357-
```
358-
Template ::= InheritClauses [TemplateBody]
359-
EnumDef ::= id ClassConstr InheritClauses EnumBody
360-
InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]
357+
```ebnf
358+
Template ::= InheritClauses [TemplateBody] ;
359+
EnumDef ::= id ClassConstr InheritClauses EnumBody ;
360+
InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}] ;
361361
ConstrApps ::= ConstrApp {‘with’ ConstrApp}
362-
| ConstrApp {‘,’ ConstrApp}
362+
| ConstrApp {‘,’ ConstrApp} ;
363363
```
364364

365365
**Note:** To align `extends` clauses and `derives` clauses, Scala 3 also allows multiple

0 commit comments

Comments
 (0)