They already made a formatting tool that parses carriage returns and tabs. It's not exactly rocket science to not fail on tabs and carriage returns either.
Hard tabs are not accepted by stage1 because:
- It doesn't need to. All of the self-hosted compiler source is formatted with zig fmt and so there are no hard tabs. The complexity of dealing with hard tabs need not be present in stage1.
- zig fmt is not fully stable yet; use of zig fmt is not yet ubiquitous. If stage1 accepted hard tabs, then in practice, there would be accidental mixing of tabs and spaces.
[1]: https://github.com/ziglang/zig/wiki/FAQ#why-does-zig-force-m... [2]: https://github.com/ziglang/zig/issues/544g