Skip to content
Playground(another site)

bynk.parse.unexpected_eof

Error Unexpected end of input.

The file ended while the parser still needed something: usually a closing }, ) or ], or an expression after an operator or a ,. The message says what it expected, and the position is the end of the file. The commonest cause is a } missing at the end of a braced unit or function. A missing brace with further declarations after it is reported as bynk.parse.expected_token, at the next fn or type, so it may be well above the end: check the nesting from the last declaration you edited.

Example

commons demo {
fn one() -> Int { 1 } // ✗ the file ends with the unit still open
commons demo {
fn one() -> Int { 1 }
} // ✓ closed

In the Book

See also

  • Every code in its category, Parser, on the diagnostic index.
  • bynk explain bynk.parse.unexpected_eof shows the same from the installed toolchain, without a network.