Whitespace

Whitespace consists of spaces, tabs, and newlines.

whitespace = " " | "\t" | "\n" | "\r" ;

Whitespace is ignored between tokens except where it serves to separate tokens.

Multiple whitespace characters between tokens are equivalent to a single space.

// Minimal whitespace
fn main()->i32{42}

// Generous whitespace
fn   main()   ->   i32   {   42   }

// Both programs are equivalent