True if `raw` begins with a token that can only be a continuation.
(prev_kind: str, raw: str)
| 357 | |
| 358 | |
| 359 | def is_continuation(prev_kind: str, raw: str) -> bool: |
| 360 | """True if `raw` begins with a token that can only be a continuation.""" |
| 361 | if prev_kind not in ("prop", "other"): |
| 362 | return False |
| 363 | stripped = raw.rstrip() |
| 364 | if not stripped.strip(): |
| 365 | return False |
| 366 | return bool(_CONTINUATION_PREFIX.match(stripped)) |
| 367 | |
| 368 | |
| 369 | def tokenize(raw_lines: list[str]) -> list[LogicalLine]: |