(style: string)
| 105 | |
| 106 | // A namedKey Token which will decorate the state with a `name` |
| 107 | function namedKey(style: string) { |
| 108 | return { |
| 109 | style, |
| 110 | match: (token: Token) => token.kind === 'String', |
| 111 | update(state: State, token: Token) { |
| 112 | state.name = token.value.slice(1, -1); // Remove quotes. |
| 113 | }, |
| 114 | }; |
| 115 | } |