Lyricdev
GitHub

LYR-LEX0006

an exponent with no digits

error ยท spec 01-lexical

A decimal literal has an e or E, perhaps with a sign, and no decimal digit after it: 1e, 2.5e+.

Explanation

The exponent of a float literal is a decimal number after the e and its optional sign. Without digits the literal is incomplete.

Write the exponent's digits, 1e3, or leave the e off.

Example

$ cat src/main.lyr
fn main(): void {
    let x = 1e;
    let _ = x;
}
$ lyric build
error[LYR-LEX0006]: expected exponent part to be a decimal number
error[LYR-PAR0006]: invalid integer suffix: 'e'