mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2025-09-25 07:51:30 +02:00
implement super basic check
This commit is contained in:
parent
b71b7f309b
commit
3f4846744b
2 changed files with 44 additions and 4 deletions
11
src/main.rs
11
src/main.rs
|
@ -1,16 +1,23 @@
|
|||
use lexer::Token;
|
||||
use logos::Lexer;
|
||||
use logos::Logos;
|
||||
use syntax::parse;
|
||||
use syntax::parse_syntax;
|
||||
use utils::ws;
|
||||
use winnow::prelude::*;
|
||||
use winnow::Parser;
|
||||
|
||||
use crate::syntax::check_syntax;
|
||||
|
||||
mod lexer;
|
||||
mod syntax;
|
||||
mod utils;
|
||||
|
||||
fn main() {
|
||||
// valid
|
||||
let input = "load \"./image.png\" | invert | save \"./image_processed.jpg\"";
|
||||
dbg!(parse(input));
|
||||
dbg!(parse_syntax(input));
|
||||
|
||||
// invalid
|
||||
let invalid_no_streamer = "| invert | save \"./image_processed.jpg\"";
|
||||
check_syntax(parse_syntax(invalid_no_streamer), invalid_no_streamer)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue