remove unused lexer

This commit is contained in:
Aaro Koivukangas
2026-01-21 20:12:06 +02:00
parent c80e34af06
commit bc2dbaa94a
4 changed files with 5 additions and 2 deletions
-1
View File
@@ -1 +0,0 @@
pub fn lexer() {}
+1 -1
View File
@@ -1,4 +1,4 @@
pub mod lexer;
pub mod parser;
pub mod tokenizer;
pub fn compile(code: &str) -> &str {
+3
View File
@@ -0,0 +1,3 @@
use crate::compiler::tokenizer::Token;
pub fn parser(tokens: Vec<Token>) {}
+1
View File
@@ -9,6 +9,7 @@ const MULTICHAR_OPERATOR_STR: &str = r"([<>=!]=?)";
const NUMBER_LITERAL_STR: &str = r"([0-9]+)";
const IDENTIFIER_STR: &str = r"([a-zA-Z_][a-zA-Z_0-9]*)";
// TODO: implement the whole tokenizer without regex
lazy_static! {
// Damn, regex...
static ref TOKEN_RE: Regex = Regex::new(format!(r#"{WHITESPACE_REGEX_STR}|{COMMENT_REGEX_STR}|{PUNCTUATION_STR}|{SINGLE_CHAR_OPERATOR_STR}|{MULTICHAR_OPERATOR_STR}|{NUMBER_LITERAL_STR}|{IDENTIFIER_STR}"#).as_str()).unwrap();