待辦事項 #45188

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

啟用日期: 2022-07-22 00:12 最後更新: 2022-07-23 19:17

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

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
  • 處理結果 Update from to Accepted
  • Details Updated
評語

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
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入