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
//! Abstract syntax for bashlite — a tiny, total shell.
//!
//! A script is a list of [`Stmt`]s. Words ([`Word`]) carry their interpolation
//! structure from the lexer so eval expands them with no re-scanning.
pub use WordPart;
/// A word = a list of segments concatenated (then field-split on whitespace if
/// the result of an unquoted expansion contains spaces — but v1 keeps it
/// simple: one word expands to exactly one string; no field splitting).
pub type Word = ;
/// A statement in a script body.
/// A simple command: a command name plus argument words. `[ ... ]` tests parse
/// as a command named `[` with the test words as args (so the eval path is
/// uniform with builtins).