Write a Flow function `processToken(token: Token): string` that uses a `match` expression to process validated tokens. Most branches return a string, but the `'error'` branch should signal an impossible state by throwing.

An `invariant` function is provided in `invariant.js` that you can import.
