Skip to content

Commit cdc905f

Browse files
committed
Fix formatting in reference/syntax.md
1 parent b5f34a5 commit cdc905f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/_docs/reference/syntax.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ referring to the ASCII fragment `\u0000` – `\u007F`.
1010
_Unicode escapes_ are used to represent the [Unicode character](https://www.w3.org/International/articles/definitions-characters/) with the given
1111
hexadecimal code:
1212

13-
```
13+
```ebnf
1414
UnicodeEscape ::= ‘\’ ‘u’ {‘u’} hexDigit hexDigit hexDigit hexDigit
1515
hexDigit ::= ‘0’ | … | ‘9’ | ‘A’ | … | ‘F’ | ‘a’ | … | ‘f’
1616
```
@@ -22,7 +22,7 @@ Informal descriptions are typeset as `“some comment”`.
2222
The lexical syntax of Scala is given by the following grammar in EBNF
2323
form.
2424

25-
```
25+
```ebnf
2626
whiteSpace ::= ‘\u0020’ | ‘\u0009’ | ‘\u000D’ | ‘\u000A’
2727
upper ::= ‘A’ | … | ‘Z’ | ‘\$’ | ‘_’ “… and Unicode category Lu”
2828
lower ::= ‘a’ | … | ‘z’ “… and Unicode category Ll”
@@ -97,7 +97,7 @@ to indicate a token sequence `ts` that is either enclosed in a pair of braces `{
9797
notation `:<<< ts >>>` indicates a token sequence `ts` that is either enclosed in a pair of braces `{ ts }` or that constitutes an indented region `indent ts outdent` that follows
9898
a `:` at the end of a line.
9999

100-
```
100+
```ebnf
101101
<<< ts >>> ::= ‘{’ ts ‘}’
102102
| indent ts outdent
103103
:<<< ts >>> ::= [nl] ‘{’ ts ‘}’
@@ -108,7 +108,7 @@ a `:` at the end of a line.
108108

109109
### Regular keywords
110110

111-
```
111+
```ebnf
112112
abstract case catch class def do else
113113
enum export extends false final finally for
114114
given if implicit import lazy match new
@@ -121,7 +121,7 @@ type val var while with yield
121121

122122
### Soft keywords
123123

124-
```
124+
```ebnf
125125
as derives end extension infix inline opaque open throws
126126
transparent using | * + -
127127
```
@@ -135,7 +135,7 @@ The context-free syntax of Scala is given by the following EBNF
135135
grammar:
136136

137137
### Literals and Paths
138-
```
138+
```ebnf
139139
SimpleLiteral ::= [‘-’] integerLiteral
140140
| [‘-’] floatingPointLiteral
141141
| booleanLiteral
@@ -157,7 +157,7 @@ ClassQualifier ::= ‘[’ id ‘]’
157157
```
158158

159159
### Types
160-
```
160+
```ebnf
161161
Type ::= FunType
162162
| HkTypeParamClause ‘=>>’ Type
163163
| FunParamClause ‘=>>’ Type
@@ -203,7 +203,7 @@ Types ::= Type {‘,’ Type}
203203
```
204204

205205
### Expressions
206-
```
206+
```ebnf
207207
Expr ::= FunParams (‘=>’ | ‘?=>’) Expr
208208
| HkTypeParamClause ‘=>’ Expr
209209
| Expr1
@@ -306,7 +306,7 @@ ArgumentPatterns ::= ‘(’ [Patterns] ‘)’
306306
```
307307

308308
### Type and Value Parameters
309-
```
309+
```ebnf
310310
ClsTypeParamClause::= ‘[’ ClsTypeParam {‘,’ ClsTypeParam} ‘]’
311311
ClsTypeParam ::= {Annotation} [‘+’ | ‘-’] id [HkTypeParamClause] TypeParamBounds
312312
@@ -334,7 +334,7 @@ DefParam ::= {Annotation} [‘inline’] Param
334334
```
335335

336336
### Bindings and Imports
337-
```
337+
```ebnf
338338
Bindings ::= ‘(’ [Binding {‘,’ Binding}] ‘)’
339339
Binding ::= (id | ‘_’) [‘:’ Type]
340340
@@ -372,7 +372,7 @@ EndMarkerTag ::= id | ‘if’ | ‘while’ | ‘for’ | ‘match’ |
372372
```
373373

374374
### Declarations and Definitions
375-
```
375+
```ebnf
376376
RefineDcl ::= ‘val’ ValDcl
377377
| ‘def’ DefDcl
378378
| ‘type’ {nl} TypeDcl

0 commit comments

Comments
 (0)