2019-11-07 10:55:15 -08:00
|
|
|
use crate::common::*;
|
|
|
|
|
2020-02-14 04:49:25 -08:00
|
|
|
/// A module, the top-level type produced by the parser. So-named because
|
|
|
|
/// although at present, all justfiles consist of a single module, in the future
|
|
|
|
/// we will likely have multi-module and multi-file justfiles.
|
2019-11-07 10:55:15 -08:00
|
|
|
///
|
|
|
|
/// Not all successful parses result in valid justfiles, so additional
|
2020-02-14 04:49:25 -08:00
|
|
|
/// consistency checks and name resolution are performed by the `Analyzer`,
|
|
|
|
/// which produces a `Justfile` from a `Module`.
|
2019-11-07 10:55:15 -08:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub(crate) struct Module<'src> {
|
|
|
|
/// Items in the justfile
|
2020-02-10 20:07:06 -08:00
|
|
|
pub(crate) items: Vec<Item<'src>>,
|
2019-11-07 10:55:15 -08:00
|
|
|
/// Non-fatal warnings encountered during parsing
|
2021-03-28 23:39:23 -07:00
|
|
|
pub(crate) warnings: Vec<Warning>,
|
2019-11-07 10:55:15 -08:00
|
|
|
}
|