Skip to content

Commit 0b51f87

Browse files
committed
Updates for bigint literals
1 parent ba9af79 commit 0b51f87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/reference/lexical_structure/literals.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Unicode escapes can be written in a fixed-width form with exactly four hexadecim
149149

150150
## Numerics
151151

152-
The lexer recognizes numerics of the `Number`, `Int32`, `Int64`, `Float32`, `Float64`, `WasmI32`, `WasmI64`, `WasmF32`, and `WasmF64` types.
152+
The lexer recognizes numerics of the `Number`, `BigInt`, `Int32`, `Int64`, `Float32`, `Float64`, `WasmI32`, `WasmI64`, `WasmF32`, and `WasmF64` types.
153153

154154
### Integers
155155

@@ -166,7 +166,7 @@ bin_digit = ['0'-'1'] ;
166166
oct_digit = ['0'-'7'] ;
167167
hex_digit = ['0'-'9' 'A'-'F' 'a'-'f'] ;
168168
169-
int_suffix = ['l' 'L' 'n' 'N'] ;
169+
int_suffix = ['t', 'l' 'L' 'n' 'N'] ;
170170
```
171171

172172
Integers can be written in decimal (base 10), binary (base 2), octal (base 8), or hexadecimal (base 16). An integer written without a prefix is considered to be a decimal integer, while an `0b` or `0B` prefix denotes a binary integer, `0o` or `0O` denotes an octal integer, and `0x` or `0X` denotes a hexadecimal integer. The numeric part of the integer must start with a digit, but underscores are allowed to appear throughout the numeric portion to help with the readability of the integer and don't affect the value of the integer.
@@ -176,6 +176,7 @@ A suffix (or lack of suffix) denotes the Grain type of the integer:
176176
| Suffix | Type |
177177
| ------ | --------- |
178178
| none | `Number` |
179+
| `t` | `BigInt` |
179180
| `l` | `Int32` |
180181
| `L` | `Int64` |
181182
| `n` | `WasmI32` |

0 commit comments

Comments
 (0)