public scanNumberEnd(line as String, start as Long) as Long
Scans to the end of a numeric literal starting at start in line.
Supports decimal, hexadecimal (0x), binary (0b), octal (0o), floating-point, scientific notation (e/E with optional +/-), underscore digit separators, and standard numeric type suffixes (u8, s16, i32, u64, ul, f, d, h, L).
| Parameter | Description |
|---|---|
line | Source line text. |
start | Inclusive start index of the number. |
Exclusive end index of the number literal.
import klyn.code
t = CodeTokenizer(LanguageProfile("klyn", "Klyn"))
assert t.scanNumberEnd("0xFF_00u32 + 1", 0) == 10