Improve highlighting of Julia operators
This commit is contained in:
parent
b2120e21eb
commit
739ca0fd42
1 changed files with 14 additions and 4 deletions
|
@ -12,20 +12,30 @@
|
||||||
mode
|
mode
|
||||||
`((,(let ((OR "\\|"))
|
`((,(let ((OR "\\|"))
|
||||||
(concat "\\(" ; stolen `matlab.el' operators first
|
(concat "\\(" ; stolen `matlab.el' operators first
|
||||||
"[<>!]=?" OR
|
"[<>]=?" OR
|
||||||
"\\.[/*^']" OR
|
"\\.[/*^']" OR
|
||||||
|
"===" OR
|
||||||
"==" OR
|
"==" OR
|
||||||
"=>" OR
|
"=>" OR
|
||||||
"\\<xor\\>" OR
|
"\\<xor\\>" OR
|
||||||
"[-+*\\/^&|$]=?" OR ; this has to come before next (updating operators)
|
"[-+*\\/^&|$]=?" OR ; this has to come before next (updating operators)
|
||||||
"[-!^&|*+\\/~:]" OR
|
"[-^&|*+\\/~]" OR
|
||||||
|
;; `:` defines a symbol in Julia and must not be highlighted
|
||||||
|
;; as an operator. The only operators that start with `:` are
|
||||||
|
;; `:<` and `::`.
|
||||||
|
"[:<]:" OR
|
||||||
|
;; Julia variables and names can have `!`. Thus, `!` must be
|
||||||
|
;; highlighted as a single operator only in some
|
||||||
|
;; circumstances. However, full support can only be
|
||||||
|
;; implemented by a full parser. Thus, here, we will handle
|
||||||
|
;; only the simple cases.
|
||||||
|
"[[:space:]]!=?=?" OR "^!=?=?" OR
|
||||||
|
;; The other math operators that starts with `!`.
|
||||||
;; more extra julia operators follow
|
;; more extra julia operators follow
|
||||||
"[%$]" OR
|
"[%$]" OR
|
||||||
;; bitwise operators
|
;; bitwise operators
|
||||||
">>>" OR ">>" OR "<<" OR
|
">>>" OR ">>" OR "<<" OR
|
||||||
">>>=" OR ">>" OR "<<" OR
|
">>>=" OR ">>" OR "<<" OR
|
||||||
;; comparison
|
|
||||||
"[<>!]=?" OR
|
|
||||||
"\\)"))
|
"\\)"))
|
||||||
1 font-lock-type-face)))))
|
1 font-lock-type-face)))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue