# `Aether.Lexer`
[🔗](https://github.com/joetjen/ichor/blob/v0.3.0/lib/aether/lexer.ex#L1)

Turns `.aether` source text into a flat list of `Aether.Token`s.

Whitespace and `;`-to-end-of-line comments are trivia here -- they
separate tokens but never appear in the output. This is Ichor's own
front-end lexer, entirely separate from the `@skip`/`@noskip` machinery
a *compiled* Aether grammar applies to *its own* rules -- that splicing
happens later, in `Aether.Parser`.

# `lex`

```elixir
@spec lex(String.t(), String.t() | nil) ::
  {:ok, [Aether.Token.t()]} | {:error, Ichor.Error.t()}
```

Lexes `source` into a token stream, terminated by a single `:eof` token.
`file` is carried into any `Ichor.Error` produced, purely for display.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
