alexpaniman b9924c76da
[clang] Make -dump-tokens option align tokens (#164894)
When using `-Xclang -dump-tokens`, the lexer dump output is currently
difficult to read because the data are misaligned. The existing
implementation simply separates the token name, spelling, flags, and
location using `'\t'`, which results in inconsistent spacing.

For example, the current output looks like this on provided in this
patch example **(BEFORE THIS PR)**:

<img width="2936" height="632" alt="image"
src="https://github.com/user-attachments/assets/ad893958-6d57-4a76-8838-7fc56e37e6a7"
/>

# Changes

This small PR improves the readability of the token dump by:

+ Adding padding after the token name and after the spelling (the
padding amount was chosen empirically to produce good average
alignment).
+ Swapping the order of location and flags (since flags can take up a
lot of space and disrupt alignment).

The result is a more readable output **(AFTER THIS PR)**:

<img width="1470" height="315" alt="image"
src="https://github.com/user-attachments/assets/c24f24e5-a431-42cc-b5b6-232bac5c635e"
/>
2026-04-03 08:33:36 -04:00
..
2013-01-28 21:43:46 +00:00
2023-08-28 12:13:42 -04:00
2016-01-27 02:18:28 +00:00
2023-08-10 13:57:40 -04:00
2024-07-02 07:26:02 -04:00
2023-08-11 08:42:01 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2018-04-06 15:14:32 +00:00
2013-01-28 20:55:54 +00:00
2013-02-09 16:41:47 +00:00
2021-08-18 07:33:14 -04:00