Print parse errors with codespan-reporting

This commit is contained in:
Joscha 2022-01-07 21:42:37 +01:00
parent 2f6911eeca
commit badc0d7a9f
5 changed files with 150 additions and 36 deletions

View file

@ -357,3 +357,14 @@ pub struct File {
pub contents: String,
pub commands: Vec<Command>,
}
impl File {
/// Create an empty dummy file. This file should only be used as a
/// placeholder value.
pub fn dummy() -> Self {
Self {
contents: String::new(),
commands: vec![],
}
}
}