update parsing comment

This commit is contained in:
Simon Gardling 2022-04-23 20:42:27 -04:00
parent 7058cd7123
commit ea7608853b

View File

@ -145,11 +145,10 @@ pub fn is_letter(c: &char) -> bool { LETTERS.contains(&c) }
#[inline] #[inline]
pub fn is_number(c: &char) -> bool { NUMBERS.contains(&c) } pub fn is_number(c: &char) -> bool { NUMBERS.contains(&c) }
/* /// 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. /// One limitation though, variables with multiple characters like `pi` cannot be multiplied (like `pipipipi` won't result in `pi*pi*pi*pi`). But that's such a niche use case (and that same thing could be done by using exponents) that it doesn't really matter.
One limitation though, variables with multiple characters like `pi` cannot be multiplied (like `pipipipi` won't result in `pi*pi*pi*pi`). But that's such a niche use case (and that same thing could be done by using exponents) that it doesn't really matter. /// In the future I may want to completely rewrite this or implement this natively in exmex.
In the future I may want to completely rewrite this or implement this natively in exmex. // TODO: use `split_function` here instead of this janky code
*/
pub fn process_func_str(function_in: &str) -> String { pub fn process_func_str(function_in: &str) -> String {
let function = function_in let function = function_in
.replace("log10(", "log(") // log10 -> log .replace("log10(", "log(") // log10 -> log