fix: avoid uncaught IndentationError when computing node positions (#3100)
The tokenizer treats a lone carriage return as a line terminator while
RebuildVisitor keeps the source split on newlines only, so for code with
\r-terminated lines the slice tokenized by _get_position_info can be
misaligned with the AST line numbers and raise IndentationError. Catch
SyntaxError (IndentationError's base) alongside the existing TokenError
guard so such nodes simply have no position information.
Closes #3091
3 files changed