Returns a description of the token.
(token: "Token")
| 183 | |
| 184 | |
| 185 | def describe_token(token: "Token") -> str: |
| 186 | """Returns a description of the token.""" |
| 187 | if token.type == TOKEN_NAME: |
| 188 | return token.value |
| 189 | |
| 190 | return _describe_token_type(token.type) |
| 191 | |
| 192 | |
| 193 | def describe_token_expr(expr: str) -> str: |
no test coverage detected