Skip to content

Commit

Permalink
dump formulas in source order
Browse files Browse the repository at this point in the history
  • Loading branch information
digama0 committed Oct 28, 2024
1 parent ed0e85c commit 54784d3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions metamath-rs/src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,9 +1735,14 @@ impl StmtParse {
println!("Formula Dump:");
let sset = db.parse_result();
let nset = db.name_result();
for sps in self.segments.values() {
for (&sa, formula) in &sps.formulas {
let sref = sset.statement(sa);
for seg in sset.segments(..) {
let Some(sps) = self.segments.get(&seg.id) else {
continue;
};
for sref in seg.range(..) {
let Some(formula) = sps.formulas.get(&sref.address()) else {
continue;
};
println!(
"{}: {}",
as_str(nset.statement_name(&sref)),
Expand Down

0 comments on commit 54784d3

Please sign in to comment.