Docs menu

E108: A name was expected here

What compiler error E108 means, and how to fix it.

Turf was waiting for a name – of a variable, function, parameter, struct, field, enum variant, module – and found something that isn’t one. The message says which name it was looking for and after what.

Example
mut : int = 5;               // a variable needs a namefn (a: int): int { ... }     // a function needs a namestruct { x: int }            // so does a structimport ;                     // so does an import

Give it one:

Example
mut count: int = 5;fn add(a: int): int { ... }

A name must start with a letter or an underscore, and it can’t be one of Turf’s reserved words (if, fn, run, step, ptr, …). If you used a reserved word as a name, Turf reads it as the keyword and complains that the name is missing: rename it.

Run turf --explain E108 in a terminal to read this again.

Last updated: Oct 15, 2026Edit this page on GitHub

Esc

Type to search.