diff --git a/src/parsing.rs b/src/parsing.rs index 5815ef5..6c8cd4a 100644 --- a/src/parsing.rs +++ b/src/parsing.rs @@ -44,13 +44,13 @@ impl BackingFunction { } } -lazy_static::lazy_static! { - static ref VALID_VARIABLES: Vec = "xXeEπ".chars().collect(); - static ref LETTERS: Vec = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - .chars() - .collect(); - static ref NUMBERS: Vec = "0123456789".chars().collect(); -} +const VALID_VARIABLES: [char; 5] = ['x', 'X', 'e', 'E', 'π']; +const LETTERS: [char; 52] = [ + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', +]; +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.