| // Copyright (C) 2019 Leo Balter. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| |
| /*--- |
| esid: prod-NumericLiteralSeparator |
| description: > |
| `0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit |
| info: | |
| NumericLiteral :: |
| DecimalIntegerLiteral BigIntLiteralSuffix |
| NumericLiteralBase BigIntLiteralSuffix |
| |
| NumericLiteralBase :: |
| BinaryIntegerLiteral |
| OctalIntegerLiteral |
| HexIntegerLiteral |
| |
| BigIntLiteralSuffix :: n |
| |
| NumericLiteralSeparator :: |
| _ |
| |
| BinaryIntegerLiteral :: |
| 0b BinaryDigits |
| 0B BinaryDigits |
| |
| BinaryDigits :: |
| BinaryDigit |
| BinaryDigits BinaryDigit |
| BinaryDigits NumericLiteralSeparator BinaryDigit |
| |
| BinaryDigit :: one of |
| 0 1 |
| |
| features: [BigInt, numeric-separator-literal] |
| ---*/ |
| |
| assert.sameValue(0b01_00n, 0b0100n); |
| assert.sameValue(0B01_00n, 0B0100n); |