Error codes

E0002: unterminated string literal

In a terminal: auk explain E0002 prints this page.

On this page

A string literal was opened with " but never closed, or it runs past the end of its line. Ordinary strings stay on one line, so a missing quote is caught right where it happens instead of swallowing the rest of the file.

Wrong#

auk
fn greet(): str = "hello

Fixed#

auk
fn greet(): str = "hello"

Common causes#

  • A forgotten closing ".
  • A string meant to span lines: write \n, or use a triple-quoted """ string.
  • An unescaped " inside the string ends it early: write \".

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