Error codes

E0001: unexpected character

In a terminal: auk explain E0001 prints this page.

On this page

The lexer found a character that can't start any Auk token, such as $, @ or #. Auk has one spelling for each operator, so look-alikes from other languages are rejected instead of guessed at.

Wrong#

auk
fn price(n: int): str = $"{n} USD"

Fixed#

auk
fn price(n: int): str = "{n} USD"

Common causes#

  • $"..." from C#: every Auk string interpolates {x} already.
  • # for a comment: Auk uses // and /* */.
  • A stray character pasted from another language ($x, @decorator, a backtick).
  • A smart quote (“ or ’) copied from a document instead of " or '.

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