diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-07-27 16:50:48 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-07-27 16:50:48 +0300 |
commit | 1bd9d5bbd304926f464cf23870b17a46385b9f7a (patch) | |
tree | 1fcdfb06601db88b9b8daa8aec73c48406125a50 /src/parse/util.rs | |
parent | 794df40494e8c83532aed39153088697aca2f57b (diff) | |
download | myslip-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.rs | 11 |
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()) +} |