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
62
63
64
65
66
//! This module is responsible for codegen and live reloading.
//!
//! There are several steps involved:
//! ## Source Files
//! - Startup - For every file specified in the [`WorkspaceConfig`], load a [`SourceFile`]
//! - EventKind::Create - create a new corresponding [`SourceFile`]
//! - EventKind::Remove - remove every matching [`SourceFile`]
//! - EventKind::Modify - find the root source file and mark it as [`Changed`], despawning all children
//!
//! ## Rsx Snippets
//!
//! Load [`RsxSnippets`] for each [`SourceFile`],
//!
//! ## RouteCodegen
//!
//! - Reparent any [`SourceFile`] to its matching [`RouteFileCollection`] if any
//!
//! Higher level parsing than beet_parse, and downstream from beet_rsx and beet_build.
//!
//! ```ignore
//! // source files that do not appear in a route collection
//! SourceFileRoot
//! ├── (SourceFile(foo.rs), FileExprHash)
//! │ ├── (StaticRoot, RsxSnippetOf, RsxTokens)
//! └── (SourceFile(foo.md), FileExprHash)
//! └── (StaticRoot, RsxSnippetOf, CombinatorTokens)
//!
//! // route collections are a seperate tree
//! RouteFileCollection
//! ├── (SourceFileRef(foo.rs), CodegenFile RouteFile)
//! │ │ // an entity for each route in a file (get, post, etc)
//! │ ├── (RouteFileMethod)
//! │ └── (RouteFileMethod)
//! └── (SourceFileRef(foo.md), CodegenFile RouteFile)
//! │ // markdown files have a single 'get' route
//! ├── (RouteFileMethod)
//! │ // generate the rust code for markdown files
//! └── (SourceFileRef(foo.md), CodegenFile, CombinatorRouteCodegen)
//! ```
//!
//!
//!
use crate*;