Are we at the end of a tuple?
(
self, extra_end_rules: t.Optional[t.Tuple[str, ...]] = None
)
| 146 | self._fail_ut_eof(None, stack, lineno) |
| 147 | |
| 148 | def is_tuple_end( |
| 149 | self, extra_end_rules: t.Optional[t.Tuple[str, ...]] = None |
| 150 | ) -> bool: |
| 151 | """Are we at the end of a tuple?""" |
| 152 | if self.stream.current.type in ("variable_end", "block_end", "rparen"): |
| 153 | return True |
| 154 | elif extra_end_rules is not None: |
| 155 | return self.stream.current.test_any(extra_end_rules) # type: ignore |
| 156 | return False |
| 157 | |
| 158 | def free_identifier(self, lineno: t.Optional[int] = None) -> nodes.InternalName: |
| 159 | """Return a new free identifier as :class:`~jinja2.nodes.InternalName`.""" |