Ticket #45189

generate_packets.py: remove comments and whitespace from input line by line

Open Date: 2022-07-22 00:16 Last Update: 2022-07-23 19:17

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

Part of #45186. Implement a PacketsDefinition._clean_lines(lines: Iterable[str]) -> Iterable[str] classmethod that removes comments, blank lines and leading/trailing whitespace from the input line-by-line. If the input ends while inside a block comment (/* */), raise ValueError.

Ticket History (3/4 Histories)

2022-07-22 00:16 Updated by: alienvalkyrie
  • New Ticket "generate_packets.py: remove comments and whitespace from input line by line" created
2022-07-22 00:41 Updated by: alienvalkyrie
  • Resolution Update from None to Accepted
  • Details Updated
Comment

This patch also makes main() call the new interface and removes the old non-linebased parse method.

2022-07-23 19:17 Updated by: alienvalkyrie
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login