ninja_build_syntax/error.rs
1/// An error that happened during parsing of a ninja file.
2///
3/// Since ninja files are usually generated this should only happen if there is
4/// a bug in the library or the program that generated the file.
5#[derive(Debug)]
6pub struct Error(());
7
8impl Error {
9 pub(crate) fn new() -> Self {
10 Self(())
11 }
12}
13
14impl std::fmt::Display for Error {
15 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
16 write!(f, "syntax error")
17 }
18}
19
20impl std::error::Error for Error {}