1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Tokens in pack text: the vocabulary, scanning text into located tokens and rendering values over
//! them.
//!
//! Token syntax is one rule set shared by every text a pack holds, so it is read in one place.
//!
//! # Responsibilities
//!
//! - [`Token`], [`TokenKind`], [`TokenTarget`]: one `{{...}}` found in text, its kind and what it
//! points at.
//! - [`Var`], [`ItemRef`]: the fixed variables and the `[pack/]item` references a target may hold.
//! - [`TokenError`]: the grammar refusals, each with its exact message.
//! - [`LocatedToken`], [`TextOrigin`]: a token with where it was found, and how a text's position
//! is reported.
//! - [`scan()`]: the one function that reads text into located tokens and the [`Diagnostics`](crate::types::Diagnostics) of the refusals.
//! - [`names_own_pack()`]: the one rule for whether a pack named in a token or hook `run` is the pack it sits in.
//! - [`TokenValues`], [`render()`]: the replacement text per token, and the splice of it into text.
//!
//! # Non-responsibilities
//!
//! Where a token may appear and what it may point at belong to the checks over a whole pack and a
//! whole set of packs.
//!
//! This file is an export-only module with no executable logic, so it carries no inline tests.
pub use TokenError;
pub use TokenKind;
pub use LocatedToken;
pub use TextOrigin;
pub use names_own_pack;
pub use Token;
pub use ItemRef;
pub use render;
pub use scan;
pub use TokenTarget;
pub use TokenValues;
pub use Var;