sway_core/language/lexed/program.rs
1use super::LexedModule;
2use crate::language::parsed::TreeType;
3
4/// A lexed, but not yet parsed or type-checked, Sway program.
5///
6/// Includes all modules in the form of a [LexedModule] tree accessed via the `root`.
7#[derive(Debug, Clone)]
8pub struct LexedProgram {
9 pub kind: TreeType,
10 pub root: LexedModule,
11}
12
13impl LexedProgram {
14 pub fn new(kind: TreeType, root: LexedModule) -> LexedProgram {
15 LexedProgram { kind, root }
16 }
17}