E0100: Unexpected token
| Code | Category | Stability |
|---|---|---|
E0100 | Parser | Permanent |
Explanation
Rue encountered a token that cannot appear at this point in the grammar. End-of-file is treated as a token for this diagnostic, so incomplete input such as a missing closing brace also reports E0100; retired E0101 is not used.
Likely cause
A delimiter or required syntax element is missing, an extra punctuation mark or keyword appears in the construct, or the source ends before the current construct is complete. The diagnostic names what the parser expected and the token it found; fix the earliest parser error first because later errors may be recovery fallout.
Examples
Unexpected end of file
fn main() {
Close the function body
fn main() {}