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
67
68
//! `resources/views/**/*.blade.php` → `resources/views/**/*.blade.xr`.
//! See `docs/ARCHITECTURE.md`'s "Laravel conversion" section for the
//! whole-file (not per-item) safety rationale: `crates/larust-macros/src/
//! view.rs`'s `view!` macro consumes a template as one indivisible unit,
//! so a bad directive or expression can't be safely omitted mid-file -
//! either the whole file translates cleanly, or none of it is trusted.
//! That rationale still holds for *most* failures - see `scan.rs`'s own
//! module doc comment for the one deliberate exception (a top-level
//! `@php` block) and why it's safe.
use ;
use HashSet;
use Path;
/// Convert-time context threaded through every Blade-conversion call -
/// `scan.rs`'s own directive/tag scanning and, through it,
/// `expr.rs`'s expression translation. Lives here, one level up from
/// both, rather than in either - `scan` already depends on `expr`
/// (`use super::expr;`), so defining this type in `scan` and having
/// `expr` reference it back would make the two modules mutually
/// dependent for no reason beyond avoiding one extra `use` at this
/// shared level.