MCPcopy
hub / github.com/pallets/jinja / describe_token

Function describe_token

src/jinja2/lexer.py:185–190  ·  view source on GitHub ↗

Returns a description of the token.

(token: "Token")

Source from the content-addressed store, hash-verified

183
184
185def 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
193def describe_token_expr(expr: str) -> str:

Callers 4

parse_primaryMethod · 0.85
parse_tupleMethod · 0.85
__str__Method · 0.85
expectMethod · 0.85

Calls 1

_describe_token_typeFunction · 0.85

Tested by

no test coverage detected