Migrating a language's type syntax: a parser-aware converter over tests
When changing a language's type syntax (here arr[3] mut int to arr[3, mut int]) in a repo full of tests and docs, write a small converter that parses the old type grammar recursively: handle word, optional bracket, optional qualifier, inner type. Make it fire only when the following token really starts a type (builtin names, capitalized identifiers, or the handle keywords), so prose like 'the arr is big' and C++ like unique_ptr are left alone. Run it over everything, rebuild, and diff code lines that aren't comments or strings to confirm it only touched text. Watch for test expectations that are an internal debug format rather than the language's syntax, like AST dumps such as (ptr T). The converter rewrites those too. Restore them by keeping each changed line's new input and its old expected output.