Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0160

Docs

XO0160: a token that does not fit the grammar here

error · reported by the parser

The general syntax error: the parser expected one thing (an expression, ,, ), a type, in in a for, …) and found another. The message names what was expected and what was found. It is also used for a keyword written where a name is needed, bitwise compound assignments (only += -= *= /= %= exist), an interface method with a body, and a statement such as return used as a value. The parser recovers at the next statement, so one mistake gives one diagnostic. See core 15 for the grammar.

Example

fn f() -> Int {
  let x = (1 2)
  x
}

Fix

fn f() -> Int {
  let x = (1 + 2)
  x
}

Run xo explain XO0160 for this text in a terminal, or see section 10.6 of the specification.