Skip to content

Commit 89dec7a

Browse files
authored
Add binary lits to syntax summaries (#19551)
Some redundancy was omitted at #19405 https://dotty.epfl.ch/docs/reference/syntax.html
2 parents 4bd3369 + 3459704 commit 89dec7a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

docs/_docs/internals/syntax.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ idrest ::= {letter | digit} [‘_’ op]
5959
quoteId ::= ‘'’ alphaid
6060
spliceId ::= ‘$’ alphaid ;
6161
62-
integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
62+
integerLiteral ::= (decimalNumeral | hexNumeral | binaryNumeral) [‘L’ | ‘l’]
6363
decimalNumeral ::= ‘0’ | digit [{digit | ‘_’} digit]
6464
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit [{hexDigit | ‘_’} hexDigit]
65+
binaryNumeral ::= ‘0’ (‘b’ | ‘B’) binaryDigit [{binaryDigit | ‘_’} binaryDigit]
6566
6667
floatingPointLiteral
6768
::= [decimalNumeral] ‘.’ digit [{digit | ‘_’} digit] [exponentPart] [floatType]

docs/_docs/reference/syntax.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ idrest ::= {letter | digit} [‘_’ op]
6060
quoteId ::= ‘'’ alphaid
6161
spliceId ::= ‘$’ alphaid ;
6262
63-
integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
63+
integerLiteral ::= (decimalNumeral | hexNumeral | binaryNumeral) [‘L’ | ‘l’]
6464
decimalNumeral ::= ‘0’ | digit [{digit | ‘_’} digit]
6565
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit [{hexDigit | ‘_’} hexDigit]
66+
binaryNumeral ::= ‘0’ (‘b’ | ‘B’) binaryDigit [{binaryDigit | ‘_’} binaryDigit]
6667
6768
floatingPointLiteral
6869
::= [decimalNumeral] ‘.’ digit [{digit | ‘_’} digit] [exponentPart] [floatType]

docs/_spec/13-syntax-summary.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ idrest ::= {letter | digit} [‘_’ op]
4949
quoteId ::= ‘'’ alphaid
5050
spliceId ::= ‘$’ alphaid ;
5151
52-
integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
52+
integerLiteral ::= (decimalNumeral | hexNumeral | binaryNumeral) [‘L’ | ‘l’]
5353
decimalNumeral ::= ‘0’ | digit [{digit | ‘_’} digit]
5454
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit [{hexDigit | ‘_’} hexDigit]
55+
binaryNumeral ::= ‘0’ (‘b’ | ‘B’) binaryDigit [{binaryDigit | ‘_’} binaryDigit]
5556
5657
floatingPointLiteral
5758
::= [decimalNumeral] ‘.’ digit [{digit | ‘_’} digit] [exponentPart] [floatType]

0 commit comments

Comments
 (0)