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)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ use logos::Span;
|
|||
use crate::lexer::Token;
|
||||
|
||||
pub mod check;
|
||||
mod error;
|
||||
pub mod error;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct PipelineElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue