Skip to main content

Module analysis

Module analysis 

Source
Expand description

Static analysis passes for type and policy discovery.

This module provides analysis passes that run before or alongside main parsing:

PassPurpose
DiscoveryPassScans for type definitions (## Definition blocks)
TypeRegistryStores and looks up type definitions during parsing
PolicyRegistryStores security predicates and capability definitions
scan_dependenciesFinds module imports in the document abstract

§Usage Order

  1. Lexer tokenizes the source
  2. DiscoveryPass scans tokens for type/policy definitions
  3. Parser receives populated TypeRegistry and PolicyRegistry
  4. Code generator uses registries for type-aware output

Re-exports§

pub use registry::FieldDef;
pub use registry::FieldType;
pub use registry::TypeDef;
pub use registry::TypeRegistry;
pub use registry::VariantDef;
pub use discovery::DiscoveryPass;
pub use discovery::DiscoveryResult;
pub use dependencies::scan_dependencies;
pub use dependencies::Dependency;
pub use policy::PolicyRegistry;
pub use policy::PredicateDef;
pub use policy::CapabilityDef;
pub use policy::PolicyCondition;

Modules§

dependencies
Dependency Scanner for the Hyperlink Module System.
discovery
Discovery pass for type and policy extraction.
policy
Security Policy Registry.
registry
Type registry for tracking user-defined types during parsing.