(style: string)
| 341 | |
| 342 | // A Name Token which will decorate the state with a `name`. |
| 343 | function name(style: string): Rule { |
| 344 | return { |
| 345 | style, |
| 346 | match: (token: Token) => token.kind === 'Name', |
| 347 | update(state: State, token: Token) { |
| 348 | state.name = token.value; |
| 349 | }, |
| 350 | }; |
| 351 | } |
| 352 | |
| 353 | // A Name Token which will decorate the previous state with a `type`. |
| 354 | function type(style: string) { |