sway_core/language/lexed/
program.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::LexedModule;
use crate::language::parsed::TreeType;

/// A lexed, but not yet parsed or type-checked, Sway program.
///
/// Includes all modules in the form of a [LexedModule] tree accessed via the `root`.
#[derive(Debug, Clone)]
pub struct LexedProgram {
    pub kind: TreeType,
    pub root: LexedModule,
}

impl LexedProgram {
    pub fn new(kind: TreeType, root: LexedModule) -> LexedProgram {
        LexedProgram { kind, root }
    }
}