aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaximilian Bosch <[email protected]>2021-12-26 13:09:27 +0000
committerMaximilian Bosch <[email protected]>2021-12-30 17:06:49 +0000
commitcb3e69df8b17ffc0cab721e2dcc285731a1c5bc9 (patch)
tree12aa7f3a565b6f664ad37e97d6ca872a4853fa86 /src
parent66790c32e9cc80eed512d67fe3630bbe124c6c61 (diff)
Add functions to highlighting list
Diffstat (limited to 'src')
-rw-r--r--src/readline.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/readline.rs b/src/readline.rs
index d689f95..2939ee1 100644
--- a/src/readline.rs
+++ b/src/readline.rs
@@ -55,7 +55,7 @@ impl Highlighter for LineHighlighter {
55 let functions = [ 55 let functions = [
56 "sin", "cos", "tan", "csc", "sec", "cot", "sinh", "cosh", "tanh", "ln", "log", 56 "sin", "cos", "tan", "csc", "sec", "cot", "sinh", "cosh", "tanh", "ln", "log",
57 "sqrt", "ceil", "floor", "rad", "deg", "abs", "asin", "acos", "atan", "acsc", 57 "sqrt", "ceil", "floor", "rad", "deg", "abs", "asin", "acos", "atan", "acsc",
58 "asec", "acot", 58 "asec", "acot", "exp2", "exp"
59 ]; 59 ];
60 let ops = Regex::new(r"(?P<o>[\+-/\*%\^!])").unwrap(); 60 let ops = Regex::new(r"(?P<o>[\+-/\*%\^!])").unwrap();
61 let mut coloured: String = ops.replace_all(line, "\x1b[35m$o\x1b[0m").into(); 61 let mut coloured: String = ops.replace_all(line, "\x1b[35m$o\x1b[0m").into();