Ticket #45188

generate_packets.py: parse packet and type definitions in one go

Date d'ouverture: 2022-07-22 00:12 Dernière mise à jour: 2022-07-23 19:17

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Jalon:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
1

Détails

Part of #45186. Make a PacketsDefintion.parse_clean_lines(lines: Iterable[str]) method that parses input line by line in one go, rather than the current approach of doing types first and then going over everything that's left again for the packets.

This will make it so types can no longer be defined anywhere, but must be defined before they're used, and may no longer be defined inside a packet definition.

Ticket History (3/4 Histories)

2022-07-22 00:12 Updated by: alienvalkyrie
  • New Ticket "generate_packets.py: parse packet and type definitions in one go" created
2022-07-22 00:39 Updated by: alienvalkyrie
  • Résolution Update from Aucun to Accepted
  • Details Updated
Commentaire

Note that this causes an edge case where at the very end of the file, an end line can be omitted – explicitly forbidding this would require writing a custom takewhile implementation, which probably isn't worth the hassle.

2022-07-23 19:17 Updated by: alienvalkyrie
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion