Skip to main content

long_decimal_integer_literal_error

Function long_decimal_integer_literal_error 

Source
pub fn long_decimal_integer_literal_error(
    source_file: &SourceFile,
    tokens: &Tokens,
    max_str_digits: usize,
) -> Option<CompileError>
Expand description

Return the syntax error for a decimal integer literal exceeding the configured limit.

The parser has already distinguished integer literals from strings, comments, floats, and complex numbers. Inspecting its tokens keeps the limit consistent for every source parsing entry point without reimplementing Python’s lexer here.