svg-filters & basic parser #15
2 changed files with 18 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
|
||||||
use chumsky::container::Container;
|
|
||||||
use rowan::{
|
use rowan::{
|
||||||
Checkpoint, GreenNode, GreenNodeBuilder, GreenNodeData, GreenTokenData, Language, NodeOrToken,
|
Checkpoint, GreenNode, GreenNodeBuilder, GreenNodeData, GreenTokenData, Language, NodeOrToken,
|
||||||
};
|
};
|
||||||
|
@ -12,6 +11,23 @@ use crate::parser::{
|
||||||
|
|
||||||
use super::lex::{self, SyntaxKind};
|
use super::lex::{self, SyntaxKind};
|
||||||
|
|
||||||
|
mod parsers {
|
||||||
|
use rowan::GreenNode;
|
||||||
|
|
||||||
|
use crate::parser::ast::lossless::lex::SyntaxKind;
|
||||||
|
|
||||||
|
use super::SyntaxError;
|
||||||
|
|
||||||
|
struct ParseResult {
|
||||||
|
green_node: GreenNode,
|
||||||
|
errors: Vec<SyntaxError>,
|
||||||
|
}
|
||||||
|
|
||||||
|
trait Parser {
|
||||||
|
fn parse<'src>(input: &[(SyntaxKind, &'src str)]) -> ParseResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq)]
|
#[derive(PartialEq, Eq)]
|
||||||
pub struct Parse {
|
pub struct Parse {
|
||||||
pub green_node: GreenNode,
|
pub green_node: GreenNode,
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
pre-commit.hooks = {
|
pre-commit.hooks = {
|
||||||
clippy.enable = true;
|
clippy.enable = false;
|
||||||
rustfmt.enable = true;
|
rustfmt.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue