| // 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` BinaryDigit 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(0b0_10n, 0b010n); |
| assert.sameValue(0B0_10n, 0B010n); |