E0002Syntax error
Reported by the compiler as an error or warning.
mettle explain E0002
The source tokenized correctly but does not follow Mettle's grammar.
Common cases and their fixes:
if/while/matchconditions require parentheses:if (x > 0) { ... } not if x > 0 { ... }every statement ends with ';'
a '{' must have a matching '}'
type annotations use ':', assignment uses '=':
var x: int64 = 1;
After a syntax error the parser resynchronizes at the next statement boundary and keeps going, so one mistake reports once, not as a cascade.