Skip to main content

model_core/
lib.rs

1//! Language-neutral source code metamodel.
2//!
3//! A [`Model`] is a set of entities (namespaces, files, types, callables,
4//! variables) linked by containment (parent) and by typed relations (calls,
5//! references, inheritance...), each relation keeping all its occurrence
6//! sites. Frontends fill a [`ModelBuilder`]; analyses read the frozen,
7//! compact [`Model`] through [`EntityRef`] and [`RelationRef`].
8
9mod builder;
10mod entity;
11mod key;
12mod metamodel;
13mod model;
14mod relation;
15mod serial;
16mod source;
17mod strings;
18mod value;
19
20pub use builder::ModelBuilder;
21pub use entity::{EntityId, EntityKind, LanguageId};
22pub use key::{Descriptor, KeyError, Package, SCHEME, SymbolKey};
23pub use metamodel::{KindId, KindInfo, Metamodel, TraitMask};
24pub use model::{EntityRef, MemoryStats, Model, RelationRef};
25pub use relation::{Provenance, RelationId, RelationKind, SiteFlags};
26pub use source::Range;
27pub use value::{Props, Value};