Clean up PEG parser code

- Reorder Parser-centric structs
- Rename fields for consistency
- Make RawCapture private
This commit is contained in:
2025-05-10 17:51:16 -07:00
parent dbe4e8963e
commit c027089936
2 changed files with 68 additions and 67 deletions
+3 -5
View File
@@ -11,11 +11,9 @@ pub fn print_labels(b: &Stat) {
return;
}
for group in parser.iter() {
if group.event.kind == "label" {
let span = group.event.span.clone();
let s = &b.code[span];
println!("- {}", s);
for capture in parser.iter() {
if capture.kind() == "label" {
println!("- {}", capture.text());
}
}
}