Skip to content

Commit 6377894

Browse files
authored
[v2] add comments to Language analysis passes (#1467)
- also fixes a minor spelling mistake in `p4_unreachable_items` name. In response to #1457 (comment)
1 parent 4fc1d69 commit 6377894

File tree

6 files changed

+7
-2
lines changed

6 files changed

+7
-2
lines changed

crates/language-v2/definition/src/compiler/analysis/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod p1_definitions;
22
mod p2_version_specifiers;
33
mod p3_references;
4-
mod p4_unreachabe_items;
4+
mod p4_unreachable_items;
55
mod p5_unused_versions;
66

77
use std::rc::Rc;
@@ -41,10 +41,15 @@ impl Analysis {
4141
};
4242

4343
for pass in &[
44+
// This pass creates `ItemMetadata` definitions for all language `Item` entries, and verifies they are correct/unique.
4445
p1_definitions::run,
46+
// This pass checks all version ranges in the grammar for correctness.
4547
p2_version_specifiers::run,
48+
// This pass collects all references between items, making sure they conform to their enabled version ranges.
4649
p3_references::run,
47-
p4_unreachabe_items::run,
50+
// This pass makes sure all items are reachable from the grammar root.
51+
p4_unreachable_items::run,
52+
// This pass makes sure that all items are used in all the versions they are enabled in.
4853
p5_unused_versions::run,
4954
] {
5055
// Early return if there are already errors, to prevent producing noise from later analysis:

crates/language-v2/definition/src/compiler/analysis/p1_definitions.rs renamed to crates/language-v2/definition/src/compiler/analysis/p1_definitions/mod.rs

File renamed without changes.

crates/language-v2/definition/src/compiler/analysis/p2_version_specifiers.rs renamed to crates/language-v2/definition/src/compiler/analysis/p2_version_specifiers/mod.rs

File renamed without changes.

crates/language-v2/definition/src/compiler/analysis/p3_references.rs renamed to crates/language-v2/definition/src/compiler/analysis/p3_references/mod.rs

File renamed without changes.

crates/language-v2/definition/src/compiler/analysis/p4_unreachabe_items.rs renamed to crates/language-v2/definition/src/compiler/analysis/p4_unreachable_items/mod.rs

File renamed without changes.

crates/language-v2/definition/src/compiler/analysis/p5_unused_versions.rs renamed to crates/language-v2/definition/src/compiler/analysis/p5_unused_versions/mod.rs

File renamed without changes.

0 commit comments

Comments
 (0)