本页尚未翻译,以下为英文原文。
#E0010: unexpected token
The parser expected one thing and found another: a missing ;, ,, ) or }, a keyword where a name goes, or an expression where an item goes. The message says what was expected; write that, or check the line before for something left open.
nabi
let x = (1 + 2;
println(f"{x}");
error[E0010]: expected `)`, found `;` --> main.nabi:1:15 | 1 | let x = (1 + 2; | - unclosed delimiter | ^ expected `)`
Close the parenthesis:
nabi
let x = (1 + 2);
println(f"{x}");
3
A missing ; reports expected `;` with help: add `;` at the end of the statement. When a delimiter is left open, a second mark points at it.
Related: E0012 syntax from another language, E0005 unterminated literal or comment
Found a mistake? Edit this page on GitHub. Last updated