malt_index/lib.rs
1//! A native index of the MATLAB path: the functions, classes, scripts, live scripts,
2//! packages (`+pkg`), class folders (`@cls`), plain folders and `private` folders that
3//! MATLAB resolves names against. It is the Rust core of malt's path index, and it has no
4//! linter dependency.
5//!
6//! - [`Index`] lists a search path up front and parses files lazily.
7//! - [`parse_file`] and [`parse_source`] turn one file into an [`Entity`].
8//! - [`parse_live_file`], [`parse_live_text_file`] and [`parse_live_bytes`] read live
9//! scripts (`.mlx` and plain-text live code).
10//! - [`Sources`] reads the source lines of files, cached by path.
11//! - [`dump::dump`] writes the index as JSON.
12//!
13//! How MATLAB is read, the entities and the JSON schema are in the documentation at
14//! <https://watermarkhu.nl/malt/api/>.
15
16pub mod comments;
17pub mod config;
18pub mod dump;
19pub mod error;
20pub mod expr;
21pub mod folder;
22pub mod fsutil;
23pub mod hierarchy;
24pub mod index;
25pub mod live;
26pub mod model;
27pub mod parse;
28pub mod paths;
29pub mod source;
30
31pub use config::ParserConfig;
32pub use error::IndexError;
33pub use expr::Expr;
34pub use hierarchy::{Ancestor, Inherited};
35pub use index::{EntryId, Index};
36pub use live::{parse_live_bytes, parse_live_file, parse_live_text_file};
37pub use model::{
38 Argument, ArgumentKind, Detail, Docstring, Entity, FunctionDetail, Kind, LiveSection,
39 PropertyDetail, SectionKind,
40};
41pub use parse::{parse_file, parse_source};
42pub use paths::{resolve_paths, PathConfig};
43pub use source::Sources;