Lyricdev
GitHub

LYR-PAR0004

a ']' is missing

error ยท spec 02-grammar

A [ is not closed: an array literal, an index, an array pattern, an array type, a throws or catch list, a type set in a pattern, a constraint or conformance list, a bound, or T.[f].

Explanation

Every [ is closed by its ] before the construct around it goes on.

Close the bracket where the list or the index ends.

Wrong

fn main(): void {
    let xs = [1, 2, 3;
}
fn main(): void {
    let xs = [1, 2, 3];
    let _ = xs;
}