File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
project/resources/referenceReplacements Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,10 @@ Literal ::= [‘-’] integerLiteral
332332### Integer Literals
333333
334334``` ebnf
335- integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
335+ integerLiteral ::= (decimalNumeral | hexNumeral | binaryNumeral ) [‘L’ | ‘l’]
336336decimalNumeral ::= ‘0’ | digit [{digit | ‘_’} digit]
337337hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit [{hexDigit | ‘_’} hexDigit]
338+ binaryNumeral ::= ‘0’ (‘b’ | ‘B’) binaryDigit [{binaryDigit | ‘_’} binaryDigit]
338339```
339340
340341Values of type ` Int ` are all integer numbers between $-2\^ {31}$ and $2\^ {31}-1$, inclusive.
@@ -357,7 +358,7 @@ The numeric ranges given by these types are:
357358The digits of a numeric literal may be separated by arbitrarily many underscores for purposes of legibility.
358359
359360> ``` scala
360- > 0 21_000 0x7F - 42L 0xFFFF_FFFF
361+ > 0 21_000 0x7F - 42L 0xFFFF_FFFF 0b0100_0010
361362> ```
362363
363364### Floating Point Literals
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ subsection:
7777 - page : reference/other-new-features/safe-initialization.md
7878 - page : reference/other-new-features/type-test.md
7979 - page : reference/other-new-features/experimental-defs.md
80+ - page : reference/other-new-features/binary-literals.md
8081 - title : Other Changed Features
8182 directory : changed-features
8283 index : reference/changed-features/changed-features.md
You can’t perform that action at this time.
0 commit comments