klyn.code.CodeTokenizer.scanNumberEnd
method
public scanNumberEnd(line as String, start as Long) as Long
Description

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).

Parameters
ParameterDescription
lineSource line text.
startInclusive start index of the number.
Returns

Exclusive end index of the number literal.

Example
import klyn.code

t = CodeTokenizer(LanguageProfile("klyn", "Klyn"))
assert t.scanNumberEnd("0xFF_00u32 + 1", 0) == 10