Skip to content

Commit

Permalink
feat: update comment with the new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
yasonk committed Nov 16, 2024
1 parent f87b2b0 commit 0f0a88d
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions core/src/mast/serialization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@
//! - MAGIC
//! - VERSION
//!
//! (lengths)
//! - decorators length (`usize`)
//! (nodes metadata)
//! - nodes length (`usize`)
//!
//! (procedure roots)
//! - procedure roots (`Vec<MastNodeId>`)
//!
//! (raw data)
//! - Decorator data
//! - Node data
//!
//! (node info structs)
//! - MAST node infos (`Vec<MastNodeInfo>`)
//!
//! (decorators metadata)
//! - decorators length (`usize`)
//!
//! (raw decorator data)
//! - Decorator data
//! - String table
//!
//! (info structs)
//! (decorator info structs)
//! - decorator infos (`Vec<DecoratorInfo>`)
//! - MAST node infos (`Vec<MastNodeInfo>`)
//!
//! (before enter and after exit decorators)
//! - before enter decorators (`Vec<(MastNodeId, Vec<DecoratorId>)>`)
Expand Down Expand Up @@ -135,9 +141,9 @@ impl Serializable for MastForest {
// write all decorator data below

let mut decorator_data_builder = DecoratorDataBuilder::new();
self.decorators
.iter()
.for_each(|decorator| decorator_data_builder.add_decorator(decorator));
for decorator in self.decorators {
decorator_data_builder.add_decorator(&decorator)
}

let (decorator_data, decorator_infos, string_table) = decorator_data_builder.finalize();

Expand Down

0 comments on commit 0f0a88d

Please sign in to comment.