Part of #43927. Apart from C-style multiline/block comments, the packets.def format is entirely line-based; however, current parsing code joins its input into one large string and splits it into lines again multiple times. This meta-ticket is about changing it to do everything on a per-line basis.
Things to note:
This will mean that type aliases have to be defined before they're used
This will also mean that type aliases can no longer be defined inside packet definitions
The current packets.def is not affected by either of those things, but it will break any third-party packets.def which does those things
Stripping out multiline /* */ comments while working line-by-line is nontrivial but doable
Steps to implement this (in order):
Separate Packet header parsing from the rest of Packet initialization #45187
Make PacketsDefinition parse the (cleaned) input line by line #45188
Make PacketsDefinition clean the the input line by line #45189
Part of #43927. Apart from C-style multiline/block comments, the packets.def format is entirely line-based; however, current parsing code joins its input into one large string and splits it into lines again multiple times. This meta-ticket is about changing it to do everything on a per-line basis.
Things to note:
Steps to implement this (in order):