Check statement correctness on compile (#104)
* Check statement correctness on compile * format * Update src/frontend/mod.rs Co-authored-by: Ahmad Afuni <root@ahmadafuni.com> * clean error handling Co-authored-by: Ahmad Afuni <root@ahmadafuni.com> * clean coding style Co-authored-by: Ahmad Afuni <root@ahmadafuni.com> * don't need to return () Co-authored-by: Ahmad Afuni <root@ahmadafuni.com> * Update github workflow for mdbook * Resolve issue from merge: pass params to check() --------- Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
This commit is contained in:
parent
c92839d897
commit
5092149f9f
4 changed files with 63 additions and 10 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
|
||||
|
|
@ -265,3 +266,14 @@ impl Operation {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Operation {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
writeln!(f, "middleware::Operation:")?;
|
||||
writeln!(f, " {:?} ", self.code())?;
|
||||
for (i, arg) in self.args().iter().enumerate() {
|
||||
writeln!(f, " {}", arg)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue