mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2025-10-30 00:57:58 +01:00
added basic method to check syntax command input
This commit is contained in:
parent
03412ce8cd
commit
3952091018
6 changed files with 251 additions and 7 deletions
|
|
@ -4,10 +4,8 @@ use super::{
|
|||
};
|
||||
|
||||
pub fn check(
|
||||
syntax: Vec<PipelineElement>,
|
||||
raw_source: &str,
|
||||
file_id: FileId,
|
||||
) -> Result<Vec<PipelineElement>, Vec<SyntaxError>> {
|
||||
syntax: &Vec<PipelineElement>,
|
||||
) -> Result<(), Vec<SyntaxError>> {
|
||||
let mut errs = Vec::new();
|
||||
|
||||
if let Err(e_span) = check_missing_streamer(&syntax) {
|
||||
|
|
@ -23,7 +21,7 @@ pub fn check(
|
|||
}
|
||||
|
||||
if errs.is_empty() {
|
||||
Ok(syntax)
|
||||
Ok(())
|
||||
} else {
|
||||
Err(errs)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue