aboutsummaryrefslogtreecommitdiff
path: root/src/parse/util.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-07-27 16:50:48 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-07-27 16:50:48 +0300
commit1bd9d5bbd304926f464cf23870b17a46385b9f7a (patch)
tree1fcdfb06601db88b9b8daa8aec73c48406125a50 /src/parse/util.rs
parent794df40494e8c83532aed39153088697aca2f57b (diff)
downloadmyslip-1bd9d5bbd304926f464cf23870b17a46385b9f7a.tar.gz
myslip-1bd9d5bbd304926f464cf23870b17a46385b9f7a.zip
Created parse_token and added tests for it
Diffstat (limited to 'src/parse/util.rs')
-rw-r--r--src/parse/util.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/parse/util.rs b/src/parse/util.rs
new file mode 100644
index 0000000..864005a
--- /dev/null
+++ b/src/parse/util.rs
@@ -0,0 +1,11 @@
+
+use crate::parse::parsetree::Token::*;
+use crate::parse::parsetree::Token;
+
+pub fn sym(s: &str) -> Token {
+ Sym(s.to_string())
+}
+
+pub fn whitespace(s: &str) -> Token {
+ Whitespace(s.to_string())
+}