tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

numeric-separator-literal-bil-bd-nsl-bds.js (885B)


      1 // Copyright (C) 2019 Leo Balter. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: prod-NumericLiteralSeparator
      6 description: >
      7  `0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit
      8 info: |
      9  NumericLiteral ::
     10    DecimalIntegerLiteral BigIntLiteralSuffix
     11    NumericLiteralBase BigIntLiteralSuffix
     12 
     13  NumericLiteralBase ::
     14    BinaryIntegerLiteral
     15    OctalIntegerLiteral
     16    HexIntegerLiteral
     17 
     18  BigIntLiteralSuffix :: n
     19 
     20  NumericLiteralSeparator ::
     21    _
     22 
     23  BinaryIntegerLiteral ::
     24    0b BinaryDigits
     25    0B BinaryDigits
     26 
     27  BinaryDigits ::
     28    BinaryDigit
     29    BinaryDigits BinaryDigit
     30    BinaryDigits NumericLiteralSeparator BinaryDigit
     31 
     32  BinaryDigit :: one of
     33    0 1
     34 
     35 features: [BigInt, numeric-separator-literal]
     36 ---*/
     37 
     38 assert.sameValue(0b0_10n, 0b010n);
     39 assert.sameValue(0B0_10n, 0B010n);
     40 
     41 reportCompare(0, 0);