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
9pub mod binary;
10mod builder;
11mod entity;
12mod hash;
13mod key;
14mod metamodel;
15mod model;
16mod relation;
17mod serial;
18mod source;
19mod strings;
20mod value;
21
22pub use builder::ModelBuilder;
23pub use entity::{EntityId, EntityKind, LanguageId};
24pub use key::{Descriptor, KeyError, Package, SCHEME, SymbolKey};
25pub use metamodel::{KindId, KindInfo, Metamodel, TraitMask};
26pub use model::{EntityRef, MemoryStats, Model, RelationRef};
27pub use relation::{Provenance, RelationId, RelationKind, SiteFlags};
28pub use source::Range;
29pub use value::{BRANCHES_PROP, Props, Value};