From ce402276bcf597caeb94292b6b1587b22c78b383 Mon Sep 17 00:00:00 2001 From: mStar aka a person <12024604-mstarongitlab@users.noreply.gitlab.com> Date: Fri, 26 Jan 2024 15:15:50 +0100 Subject: [PATCH] thing --- src/lib.rs | 2 +- src/parser/mod.rs | 1 + src/parser/preparser.rs | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/parser/mod.rs create mode 100644 src/parser/preparser.rs diff --git a/src/lib.rs b/src/lib.rs index 442f3c0..84d5e3a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,2 +1,2 @@ mod data_types; - +mod parser; diff --git a/src/parser/mod.rs b/src/parser/mod.rs new file mode 100644 index 0000000..938c790 --- /dev/null +++ b/src/parser/mod.rs @@ -0,0 +1 @@ +pub (crate) mod preparser; \ No newline at end of file diff --git a/src/parser/preparser.rs b/src/parser/preparser.rs new file mode 100644 index 0000000..64dd87b --- /dev/null +++ b/src/parser/preparser.rs @@ -0,0 +1,5 @@ +// Prepares the given raw code to be consumed by the tokeniser +// It achieves this by adding missing semicolons and adjusting whitespace (normalising to one space for everything outside of strings) +pub fn preparse(raw: &str) -> String { + String::from("value") +} \ No newline at end of file