diff --git a/.gitignore b/.gitignore index 7be5f84..a88b5db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ /target .direnv .devenv -out.png -.pre-commit-config.yaml -src diff --git a/src/parse.rs b/src/parse.rs index 102fc6e..18eedb0 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -55,22 +55,25 @@ pub fn parse_the_shit_out_of_this_but_manually<'a>( Ok(Token::Text(s)) => r.push(LanguageStructureThingy::Text(s)), Ok(Token::Newline) => r.push(LanguageStructureThingy::Text("\n".to_owned())), Ok(Token::ParenOpen) => hehe_sexpression_funy(&mut r, &mut lex), - Err(()) - | Ok(Token::ParenClose) - | Ok(Token::String(_)) - | Ok(Token::Equals) - | Ok(Token::Asterisk) - | Ok(Token::Underscore) - | Ok(Token::Backslash) - | Ok(Token::WavyThing) - | Ok(Token::Sparkles) - | Ok(Token::HeadingLevelIndicator) => { + Ok(Token::String(_)) => todo!(), + Ok(Token::Equals) => todo!(), + Ok(Token::Asterisk) => todo!(), + Ok(Token::Underscore) => todo!(), + Ok(Token::Backslash) => todo!(), + Ok(Token::WavyThing) => todo!(), + Ok(Token::Sparkles) => todo!(), + Ok(Token::HeadingLevelIndicator) => todo!(), + Err(()) | Ok(Token::ParenClose) => { reporter.report_diagnostic(*file_id, loc, DiagnosticKind::InvalidToken) } } } reporter.fail_step_if_failed(); + // match lex.next() { + // Some(Err(e)) => panic!("mauuu~ :(, e: {e:?}"), + // None => break, + // } r } @@ -109,11 +112,3 @@ fn hehe_sexpression_funy(r: &mut Vec, lex: &mut Lexer<' todo!() } } - -fn mk_simple_sexpression(name: impl ToString, content: impl ToString) -> LanguageStructureThingy { - LanguageStructureThingy::Sexpression { - name: name.to_string(), - attrs: HashMap::new(), - content: Box::new(LanguageStructureThingy::Text(content.to_string())), - } -}