don't use lazy static here

This commit is contained in:
Simon Gardling 2022-03-21 09:17:35 -04:00
parent 67c7c62847
commit 1a3e04eff1

View File

@ -44,13 +44,13 @@ impl BackingFunction {
} }
} }
lazy_static::lazy_static! { const VALID_VARIABLES: [char; 5] = ['x', 'X', 'e', 'E', 'π'];
static ref VALID_VARIABLES: Vec<char> = "xXeEπ".chars().collect(); const LETTERS: [char; 52] = [
static ref LETTERS: Vec<char> = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
.chars() 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
.collect(); 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
static ref NUMBERS: Vec<char> = "0123456789".chars().collect(); ];
} const NUMBERS: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
/* /*
EXTREMELY Janky function that tries to put asterisks in the proper places to be parsed. This is so cursed. But it works, and I hopefully won't ever have to touch it again. EXTREMELY Janky function that tries to put asterisks in the proper places to be parsed. This is so cursed. But it works, and I hopefully won't ever have to touch it again.