Error codes

E0020: unexpected token

In a terminal: auk explain E0020 prints this page.

On this page

The parser expected one specific token (the message says which) and found something else. This is the general syntax error; the note usually shows the expected form.

Wrong#

auk
fn add(a: int b: int): int = a + b

Fixed#

auk
fn add(a: int, b: int): int = a + b

Common causes#

  • A missing , between parameters, arguments, fields or list items.
  • = instead of == in an if or while condition.
  • Two match arms on one line without a , between them.
  • ..base not last in a struct literal.

Stuck on a word? Try the glossary. Got a compiler error? Look up its code. Improve this page