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

A single lexical token produced by `Aether.Lexer` from `.aether` source
text.

This is Ichor's own front-end scanning a grammar-description file, not to
be confused with the "tokens" a *user's* Aether grammar itself declares
(`ALL_UPPERCASE` productions) -- those become
`Aether.Token{type: :upper_ident}` values here, same as any other
identifier.

# `case_flag`

```elixir
@type case_flag() :: :default | :insensitive | :sensitive
```

# `char_class_value`

```elixir
@type char_class_value() :: %{negate: boolean(), items: [class_item()]}
```

# `class_item`

```elixir
@type class_item() ::
  {:range, first :: non_neg_integer(), last :: non_neg_integer()}
  | {:char, non_neg_integer()}
  | {:posix, :alpha | :alnum | :digit | :space | :hex}
```

# `string_value`

```elixir
@type string_value() :: %{text: String.t(), case: case_flag()}
```

# `t`

```elixir
@type t() :: %Aether.Token{
  column: pos_integer(),
  line: pos_integer(),
  type: type(),
  value: value()
}
```

# `type`

```elixir
@type type() ::
  :at_grammar
  | :at_root
  | :at_skip
  | :at_noskip
  | :at_case_insensitive
  | :at_indent
  | :at_samecol
  | :at_native
  | :at_hint
  | :at_keywords
  | :at_refine
  | :define
  | :arrow
  | :pipe
  | :star
  | :plus
  | :question
  | :lbrace
  | :rbrace
  | :comma
  | :amp
  | :bang
  | :colon
  | :lparen
  | :rparen
  | :tilde
  | :dot
  | :upper_ident
  | :lower_ident
  | :string
  | :char_class
  | :regex
  | :number
  | :eof
```

# `value`

```elixir
@type value() :: String.t() | integer() | string_value() | char_class_value() | nil
```

---

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