# `Grammar.VM.Token`
[🔗](https://github.com/joetjen/ichor_runtime/blob/v0.6.0/lib/grammar/vm/token.ex#L1)

One lexed token from `Grammar.VM.Tokenizer` -- the target grammar's own
tokens (e.g. a calculator's `NUMBER`, `"+"`), not to be confused with
`Aether.Token` (Ichor's front-end lexing `.aether` source itself).

`capture` is `nil` for an ordinary token (its capture, when some rule
references it, is built as `{:token, name, text}` from `text` alone).
A `Grammar.IR.CustomLexeme`-matched token (`c:Ichor.CustomLexeme.scan/3`
returning an explicit capture override, not `nil`) carries its own
structure here instead -- a string-interpolation token's embedded
expressions, say -- which the rule level uses verbatim in place of the
usual flat-text capture.

# `t`

```elixir
@type t() :: %Grammar.VM.Token{
  capture: Ichor.Capture.node_t() | nil,
  column: pos_integer(),
  line: pos_integer(),
  name: atom(),
  text: String.t()
}
```

---

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